From owner-freebsd-hackers Thu Jun 27 12:45:47 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA19473 for hackers-outgoing; Thu, 27 Jun 1996 12:45:47 -0700 (PDT) Received: from relay-4.mail.demon.net (relay-4.mail.demon.net [158.152.1.108]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA19456 for ; Thu, 27 Jun 1996 12:45:33 -0700 (PDT) Received: from post.demon.co.uk ([158.152.1.72]) by relay-4.mail.demon.net id ae26974; 27 Jun 96 19:28 GMT Received: from jraynard.demon.co.uk ([158.152.42.77]) by relay-3.mail.demon.net id aa26994; 27 Jun 96 18:09 +0100 Received: (from fhackers@localhost) by jraynard.demon.co.uk (8.6.12/8.6.12) id JAA00671; Thu, 27 Jun 1996 09:49:26 GMT Date: Thu, 27 Jun 1996 09:49:26 GMT Message-Id: <199606270949.JAA00671@jraynard.demon.co.uk> From: James Raynard To: alk@think.com CC: jkh@time.cdrom.com, hackers@freebsd.org In-reply-to: <199606270638.BAA00387@compound.Think.COM> (message from Tony Kimball on Thu, 27 Jun 1996 01:38:17 -0500 (CDT)) Subject: Re: longstanding, woeful inadeqacy Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > : 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