Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: core files under SV Message-ID: <1989Nov15.161241.4110@virtech.uucp> Date: 15 Nov 89 16:12:41 GMT References: Distribution: comp Organization: Virtual Technologies Inc. Lines: 28 In article , mrd@sun.soe.clarkson.edu (Michael DeCorte) writes: > > There has got to be a little function I can call that will generate a > core file of my process but I sure can't find it in sections 2 or 3. > Anybody know what it is? > > NOTE I want to generate a core file but NOT exit. Yup I just want to > go along on my merry way. There is no system or library call to do this, but you could just do the following: if( fork() == 0 ) { abort(); } which will result in a core file being generated and letting your current program continue executing. If you do this alot, without performing a wait(2), you will eventually run out of process table slots. So either do a wait() after the fork(), or limit the number of times you do this. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+