On Tue, 29 Apr 2003, dries wrote:
Jerry Feldman wrote : | On Mon, 28 Apr 2003 12:54:27 -0700 | | dries
wrote: | > Hello List readers, | > ......... snip | > /* | > * Make very sure it has ended and get return value | > */ | > kill(prog->pid,SIGKILL); | > waitpid(prog->pid,&status,WUNTRACED); // | WNOHANG); | > ... snip| | I generally use wait(2) rather than waitpid, although waitpid(2) should | be working. Did you check the return value from waitpid? It should | return either the pid of the process killed or -1. | Another way to handle this is to use a SIGCHILD signal handler. Well, that's what i'm doing now, i use the signal(SIGCHLD,SIG_IGN); to prevent zombies, this works but i think there is something weird going on with the
Excuse my ignorance, but you cant mix signal(for SIGCHLD) and waitpid right?