Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: core files under SV Message-ID: <11616@smoke.BRL.MIL> Date: 16 Nov 89 00:13:02 GMT References: <11613@smoke.BRL.MIL> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 27 In article <11613@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: > if ( fork() == 0 ) > abort(); As somebody else pointed out, if you do lots of these you also need to reap the zombies. The simplest solution to that is if ( (pid = fork()) == 0 ) abort(); else while ( wait( (int*)0 ) != pid ) ; 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 ) ; Note that I've assumed that you aren't performing any wait()s in signal handlers, because you really shouldn't.