in reply to Need assistance with forking multiple child processes

First, you must remember that exec never returns. It overwrites the calling process's memory with the new process and runs it. If you need to run multiple programs in sequence, you will have to fork a new subprocess for each one. You can either do those in parallel, or wait on each subprocess in turn to finish.

As for doing this from Apache and closing the HTTP connection, there's a little more to it. merlyn has a great column on the subject.

  • Comment on Re: Need assistance with forking multiple child processes