Interview Questions and Answers :: Cisco
Home > Experience Archives > Cisco > Interview Question Set 8 > Discussion
14. What does fork return?
Answer:
Upon successful completion, fork() returns a value of 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent process, no child process is created, and the global variable [errno][1] is set to indicate the error.
Surya
4 Apr, 2018 12:39 AM
Upon successful completion, fork() returns a value of 0 to the child process and returns the process ID of the child process to the parent process. Otherwise, a value of -1 is returned to the parent process, no child process is created, and the global variable [errno][1] is set to indicate the error.
Report Error
Report Error
Please Login First Click Here