Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!voder!wlbr!mh From: mh@wlbr.EATON.COM (Mike Hoegeman) Newsgroups: comp.lang.c Subject: Re: Debugging programs with fork Message-ID: <23677@wlbr.EATON.COM> Date: 3 Oct 88 22:37:14 GMT References: <12523@oberon.USC.EDU- Reply-To: mh@wlbr.eaton.com.UUCP (Mike Hoegeman) Organization: Eaton IMSD, Westlake Village, CA Lines: 18 In article <12523@oberon.USC.EDU- pgarg@pollux.usc.edu () writes: - - I am having trouble debugging programs which fork other -processes. Dbx doesn't seem to handle them easily. Is there -some feature of dbx that I am missing or is there another tool -which helps in this debugging process? - I've had this problem too. If you are debugging the parent somtimes you have to put a sleep(2) in the child part of the fork so dbx "stays" with debugging the parent. if you want to debug the child , do something like put a pause() at the start of the child part of the fork then attach to the child process with the "debug" feature of dbx (see dbx man page). once you've attached send a signal with kill(1) to break it out of the pause ( don't forget to put in a no-op signal catcher in too). hope this helps.