From owner-freebsd-hackers Tue Apr 28 12:31:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA09453 for freebsd-hackers-outgoing; Tue, 28 Apr 1998 12:31:23 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from Kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA09422; Tue, 28 Apr 1998 12:31:15 -0700 (PDT) (envelope-from karl@Mars.mcs.net) Received: from Mars.mcs.net (karl@Mars.mcs.net [192.160.127.85]) by Kitten.mcs.com (8.8.7/8.8.2) with ESMTP id OAA08800; Tue, 28 Apr 1998 14:31:15 -0500 (CDT) Received: (from karl@localhost) by Mars.mcs.net (8.8.7/8.8.2) id OAA13137; Tue, 28 Apr 1998 14:31:14 -0500 (CDT) Message-ID: <19980428143114.33662@mcs.net> Date: Tue, 28 Apr 1998 14:31:14 -0500 From: Karl Denninger To: Jason Nordwick Cc: dyson@FreeBSD.ORG, Robert Withrow , freebsd-hackers@FreeBSD.ORG Subject: Re: SIGDANGER References: <199804280030.UAA06099@spooky.rwwa.com> <199804280453.XAA03316@dyson.iquest.net> <19980428073841.05698@mcs.net> <19980428192742.1224.qmail@xcf.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <19980428192742.1224.qmail@xcf.berkeley.edu>; from Jason Nordwick on Tue, Apr 28, 1998 at 07:27:42PM -0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Apr 28, 1998 at 07:27:42PM -0000, Jason Nordwick wrote: > > Karl Denninger, on Tue 4/28/1998, wrote the following: > > > > SIGDANGER is useful if properly trapped and handled. I'd like to see if > > supported with the default to be "ignore" (ie: you have to ASK for it to > > be delivered and processed). > > > > Then it would almost always be ignored? Wouldn't this reqire patching > almost every noncritical program? It would probably be easier just to > patch a few important tools and find a Good(c) way to pick the > unlucky process. > > jay No, you patch the critical ones to do something useful with the trap. The ignored ones are known to the kernel, and they are subject to getting whacked without notice (just like we have now). Critical programs can either free up resources or exit, as they see fit. We could also define a semantic that says that if a process set SIGHOLD for that signal, then the kernel should do everything in its power NOT to whack that particular process. This leaves you with: 1) Do nothing - you get the semantics we have now. If the kernel needs to whack you it will, without notice, but the warning is ignored (you don't want to do anything with it). 2) Trap the signal - you get notice, and can clean up and exit if you are able. You're still vulnerable, in that the kernel can whack you if it needs to (and you're still around). The kernel can put these processes into the "second round" bucket - it at least knows that you're trying to help. 3) Set SIG_HOLD. You're a critical process and the kernel should go pick on someone else if it can. If it can't, well, tough bananas, but at least we tried to keep you going. This preserves the EXISTING way things work if the programmer does nothing at all. The problem with AIX is that the default, that is, "do nothing", results in you getting killed when you might not really be killed (ie: the kernel is low on space but not completely out of resources). This also leads to three "buckets" - the "default" ones, which get nailed first, the "I'm trying to be nice" ones, which get nailed next, and the "oh shit the system is fucked if these die" ones, which are the kills of last resort. -- -- Karl Denninger (karl@MCS.Net)| MCSNet - Serving Chicagoland and Wisconsin http://www.mcs.net/ | T1's from $600 monthly / All Lines K56Flex/DOV | NEW! Corporate ISDN Prices dropped by up to 50%! Voice: [+1 312 803-MCS1 x219]| EXCLUSIVE NEW FEATURE ON ALL PERSONAL ACCOUNTS Fax: [+1 312 803-4929] | *SPAMBLOCK* Technology now included at no cost To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message