Date: Thu, 27 Jun 1996 09:49:26 GMT From: James Raynard <fhackers@jraynard.demon.co.uk> To: alk@think.com Cc: jkh@time.cdrom.com, hackers@freebsd.org Subject: Re: longstanding, woeful inadeqacy Message-ID: <199606270949.JAA00671@jraynard.demon.co.uk> In-Reply-To: <199606270638.BAA00387@compound.Think.COM> (message from Tony Kimball on Thu, 27 Jun 1996 01:38:17 -0500 (CDT))
next in thread | previous in thread | raw e-mail | index | archive | help
> : Fork is an easier case since you don't need to swap the debugger's
> : executable out - just attach to the new process.
>
> Easier in what sense? It is essentially impossible to debug anything
> that forks, since by the time you can attach to it, it has gone
> veering wildly out of control.
Not if you put a sleep loop in it:-
int PauseMode = 1;
if (fork()) /* parent */
....
else { /* child */
while (PauseMode)
sleep(5);
...
}
and then set PauseMode to 0 when you attach.
--
James Raynard, Edinburgh, Scotland
james@jraynard.demon.co.uk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606270949.JAA00671>
