Jerry Feldman wrote : | On Mon, 28 Apr 2003 12:54:27 -0700 | | dries <dries@irssystems.nl> 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 waitpid thing since it should work (from what i read in the documentation of both kill and wait/waitpid). I can not reallly use the wait(&status) routine since i want to wait for a specific process and leave others untouched. (the program can have more than one external processes running). Well, anyhow, the signal(SIGCHLD,SIG_IGN); seems to work, at this point that is good enough for me !. Grtz and thanx Dries Pruimboom -- <End of message>