What is the relationship between a fork system call and an exec system call?

In Linux, what is the relationship between a fork system call and an exec system call?

Question:

What is the relationship between a fork system call and an exec system call?

Options:

A fork system call specifies an executable file and an exec system call executes the file.

A child process uses the fork system call to request its parent PID, and an exec system call to request its own PID.

A parent process duplicates itself with a fork system call, and the child process replaces itself with an exec system call.

A fork system call creates a new kernel instance, and an exec system call executes a command within the current kernel instance.

Correct Answer

The Correct Answer for this Question is

A parent process duplicates itself with a fork system call, and the child process replaces itself with an exec system call.

Leave a Comment