Fork

On July 15, 2009 / By admin / In Unix / Reply

Explain about fork.


Splitting is done by a system call named fork. Proc_id = fork (); splits the program into two copies, both of which continue to run. The only difference between the two is the value returned by fork, the process-id. Two copies of the program are made by the fork. In the child, the value returned by fork is zero, so it calls execlp, which does the command line and then dies. In the parent, fork returns non-zero so it skips the execlp.

Tags:

Reply

Spam Protection by WP-SpamFree


SEO Powered By SEOPressor