Which system call is used to create a new process in Linux?

Prepare for the Tanium Technical Account Manager Interview Test with multiple choice questions and detailed explanations. Enhance your understanding and get ready to excel in your interview!

Multiple Choice

Which system call is used to create a new process in Linux?

Explanation:
Creating a new process in Linux uses the fork system call. It duplicates the calling process, producing a child process that starts as a copy of the parent, and both continue from the next instruction. The fork return value lets you distinguish the two: the parent gets the child’s PID, while the child gets zero, so you can branch logic accordingly (often followed by an exec in the child to run a new program). Other options don’t create new processes: wait() pauses until a child changes state, exit() ends the current process, and getpid() returns the current process’s ID.

Creating a new process in Linux uses the fork system call. It duplicates the calling process, producing a child process that starts as a copy of the parent, and both continue from the next instruction. The fork return value lets you distinguish the two: the parent gets the child’s PID, while the child gets zero, so you can branch logic accordingly (often followed by an exec in the child to run a new program). Other options don’t create new processes: wait() pauses until a child changes state, exit() ends the current process, and getpid() returns the current process’s ID.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy