title: Zombie vs Orphan process with sleep
body: <p>I have the next code and I need to check the child process' status, but the sleep() confuses me. I think that the child becomes zombie for a period of time (until the parent finishes sleeping and waits). If this is correct, then what happens if the parent sleeps for 1 second instead of 1000? Will the child become orphan for a period of time?  Or is the process finished correctly since the parent waits?</p>
  <pre><code>pid_t pid = fork();
  if (pid) {
      sleep(1000);
      wait(NULL);
  }
  else {
     sleep(5);
     printf(&quot;Hello!&quot;);
  }
  </code></pre>