 <p>I see one problem here. The line:</p> <pre><code>execlp ("./dummy", "dummy", NULL); /* replace myself with a new program */ </code></pre> <p>was very important in your original program. If it is commented out, the child will continue the loop and spawning it's own sub-childs in the loop. So you will create (n*(n-1))/2 processes which then exits or are killed in a an unpredictable way.</p> <p>Also your timing is very tight. Try to use delays in order of tens of seconds, so that you can manually watch what happens in your system. </p> <p>Otherwise the program seems OK for me. </p> <p>Concerning order of execution once the new process is created it competes for CPU in the same way as its parent process. So it is basically unpredictable which one will run first and for how long. If there are several cores in your CPU, they can actually run in the same time.</p>