Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!boulder!sunybcs!rutgers!cmcl2!adm!xadmx!WPR0986%TNTECH.BITNET@cunyvm.cuny.edu From: WPR0986%TNTECH.BITNET@cunyvm.cuny.edu Newsgroups: comp.unix.wizards Subject: Re: defunct processes Message-ID: <18446@adm.BRL.MIL> Date: 23 Feb 89 18:23:27 GMT Sender: news@adm.BRL.MIL Lines: 22 In a previous article, logan@vsedev.vse.com (Jim Logan) write: > I had to fork, call system() in the child, and then ignore SIGCLD > in the parent to solve the problem (if I remember correctly). I > believe the problem is in the SCO Bourne shell since this > does not occur on any other System V machine I've used. The system() call waits until the process finishes before it returns. The proper way to do this would be to: signal (SIGCLD, SIGIGN); if (fork() == 0) { status = execvp (*argv, argv); printf ("execvp() failed: status --> %d\n", status); } The parent process will never see the child process die, and the parent process will not wait for the child process to complete (unless you call wait() after the fork()). I wouldn't think that the problem you had lies in the shell. -Walter Rowe (wpr0986@tntech.bitnet)