EmbLogic's Blog

fork

pid_t fork(void);

fork()  creates  a new process by duplicating the calling process.  The new process, referred to as the child, is an  exact  duplicate  of  the calling  process,  referred  to as the parent, except for the following points:

  • The child has its own unique process ID, and this PID does not match the ID of any existing process group.
  • The  child’s  parent  process ID is the same as the parent’s processID.
  • The child does not inherit  its  parent’s  memory  locks.
  • Process  resource  utilizations and CPU time counters are reset to zero in the child.
  • The child’s set of pending  signals  is  initially  empty.
  • The  child  does  not  inherit semaphore adjustments from its parent.
  • The child does not inherit record locks from its parent.
  • The  child  does  not  inherit timers from its parent.
  • The child does not inherit outstanding asynchronous  I/O  operations from its parent.

One Response to fork

  1. harsh.e2 says:

    So Is it something that fork child really shares or inherits with the parent except that it refers to its parent’s PID as its parent processID ?

Leave a Reply to harsh.e2 Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>