Machine-translated by Google. Questions are authored in English.
Top

Discussion

On termination which of the following system call does not return control to calling point :

  • A.exec
  • B.fork
  • C.ioctl
  • D.longjmp

Answer: A

The call that does not return to the calling point is exec.

A successful exec replaces the calling process's program with a new one: the old code, data and stack are discarded, so there is nothing to return to and execution begins at the new program's entry point. exec returns only if it fails.

fork returns twice, once in the parent (with the child's process ID) and once in the child (with 0), and ioctl returns a status to its caller. longjmp is a library function, not a system call, and it jumps back to a point saved earlier by setjmp.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.