Subj : Re: How to suspend threads of father process after fork() To : comp.programming.threads From : Loic Domaigne Date : Fri Jun 03 2005 10:56 pm Salut Tony, > Would you give me some suggestions on how to stop the threads > when waiting for the child process to execute? Assuming that you really need this feature (see DS post), the answer to your questions depends largely of your threads and your exact requirements... You can ensure that the threads in the parent process shall run after the child process has started (is it what you want?) using the following scheme In the parent process: 1) The parent thread forks the child. 2) The other threads are waiting on a condition variable, which shall be signaled when the child sends a "GO" message to the parent thread. 3) The parent thread waits for the "GO" message from the child. 4) After receiving the "GO" message, it broadcasts the condition variable that the child has started. In the child process: 1) When started, it communicates to the parent thread a "GO" message. Any IPC between the parent thread and the child does it. An simple solution would consist to use a pipe for instance. HTH, Loic. .