From owner-freebsd-arch Thu Mar 7 15: 0:27 2002 Delivered-To: freebsd-arch@freebsd.org Received: from rwcrmhc54.attbi.com (rwcrmhc54.attbi.com [216.148.227.87]) by hub.freebsd.org (Postfix) with ESMTP id 30F3B37B400; Thu, 7 Mar 2002 15:00:24 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc54.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020307230023.YNGT1214.rwcrmhc54.attbi.com@InterJet.elischer.org>; Thu, 7 Mar 2002 23:00:23 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id OAA44494; Thu, 7 Mar 2002 14:52:38 -0800 (PST) Date: Thu, 7 Mar 2002 14:52:36 -0800 (PST) From: Julian Elischer To: arch@freebsd.org Cc: phk@freebsd.org Subject: Re: Contemplating THIS change to signals. (fwd) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG oh yes, here is one other way that you can tell the difference between the two cases.. I take this to be a bug :-) Peter's fix a a bandaid to take into account that the STOP type signals are being handled in places other than userret. ---------- Forwarded message ---------- Date: Thu, 07 Mar 2002 11:30:35 +0000 From: Peter Edwards To: Julian Elischer Cc: FreeBSD current users , Mckusick@mckusick.com Subject: Re: Contemplating THIS change to signals. I mentioned something similar for a different reason. Go look at the last part of the following message in the recent -hackers archives: > Subject: ptrace bug? > MessageId: <3C712885.A0A91264@openet-telecom.com> (this was for -stable, BTW) Having the suspend for the ptrace()ing parent done in issignal is a pain when issignal is called multiple times by the debuggee before getting back to userland. The debugger sees wait() return more than once reporting the same signal depending on where the victim process was when it stopped, and the code path back to userland. It's particularly noticable when the ptrace(PT_CONTINUE) tries to continue the process with a signal, and the signal arrives back at the debugger. The debugger has no idea wheather it sees the signal because it tried to send it, or the same signal raised for some other reason. The results of this can be seen in GDB frequently when you use the "signal" command. I suggested moving the ptrace handling to postsig(), but anything along the lines of what you are mentioning seems like an improvement to me, and I'm sure you're much more likely to know what you're doing :-) I only delved in here briefly to try and work out some of the non-obvious behaviour of ptrace(). Oh, and while your mucking with issignal(), any chance of looking at the bug raised (and the patch) in the start of that message, and in PR kern/35175? :-) -- Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message