UGC NET Paper 2 (Computer Science)Hard

In a Unix file system, the Linux system call that creates a new process by duplicating the caller and returns 0 in the new process is:

  1. A. exec()
  2. B. fork()
  3. C. wait()
  4. D. clone() only

Correct answer: B. fork()

fork() returns the child's PID to the parent and 0 to the child; exec() replaces the process image rather than creating one.

More UGC NET Computer Science and Applications questions

Exams that ask this topic