Path: utzoo!censor!geac!yunexus!ists!jarvis.csri.toronto.edu!mailrus!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.unix.questions Subject: Re: core files under SV Message-ID: <29843@iuvax.cs.indiana.edu> Date: 17 Nov 89 00:24:30 GMT Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 25 gwyn@brl.arpa (Doug Gwyn) <11616@smoke.BRL.MIL> : - - if ( fork() == 0 ) - abort(); ! /* [ child not cleaned from proc. table? ] */ - -As somebody else pointed out, if you do lots of these you also need -to reap the zombies. [ . . . ] -If you don't want to wait for the core dump to complete before -proceeding, arrange for the dumping child to be detached: - - if ( (pid = fork()) == 0 ) - if ( fork() == 0 ) - abort(); - else - _exit( 0 ); - else - while ( wait( (int*)0 ) != pid ) - ; Um, I don't see why this "reaps the zombies". I thought the `wait(pid)' call was added to clean up the aborted child --- here the child is wait()'ed on, but the grandchild looks just like the child did in the original version.