public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Hunter <sean@dev.sportingbet.com>
To: vda <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: Chris Wright <chris@wirex.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kill(-1,sig)
Date: Mon, 17 Dec 2001 11:53:44 +0000	[thread overview]
Message-ID: <20011217115344.C14112@dev.sportingbet.com> (raw)
In-Reply-To: <UTC200112141734.RAA20953.aeb@cwi.nl> <Pine.LNX.4.33.0112141224200.2957-100000@penguin.transmeta.com> <20011217013445.A30669@figure1.int.wirex.com> <01121712412100.02022@manta>
In-Reply-To: <01121712412100.02022@manta>; from vda@port.imtp.ilyichevsk.odessa.ua on Mon, Dec 17, 2001 at 12:41:21PM -0200

On Mon, Dec 17, 2001 at 12:41:21PM -0200, vda wrote:
> On Monday 17 December 2001 07:34, Chris Wright wrote:
> > * Linus Torvalds (torvalds@transmeta.com) wrote:
> > > On Fri, 14 Dec 2001 Andries.Brouwer@cwi.nl wrote:
> > > > The new POSIX 1003.1-2001 is explicit about what kill(-1,sig)
> > > > is supposed to do. Maybe we should follow it.
> > >
> > > Well, we should definitely not do it in 2.4.x, at least not until proven
> > > that no real applications break.
> > >
> > > But I applied it to 2.5.x, let's see who (if anybody) hollers.
> >
> > I had to back this change out of 2.5.1 in order to get a sane shutdown.
> > killall5 -15 is commiting suicide ;-(
> 
> Hmm. Looking at killall5 source I see
> 
> kill(-1, STOP);
> for(each proc with p.sid!=my_sid) kill(proc, sig);
> kill(-1, CONT);
> 
> I guess STOP will stop killall5 too? Not good indeed.
> 
> We have two choices: either back it out or find a sane way to implement 
> killall5 with new kill -1 behaviour.

Couldn't it just do:

sigset_t new;
sigset_t savemask;
sigfillset (&new);
sigprocmask (SIG_BLOCK, &new, &savemask);

kill(-1, STOP);
for(each proc with p.sid!=my_sid) kill(proc, sig);
kill(-1, CONT);

sigprocmask (SIG_SETMASK, &savemask, (sigset_t *) 0);

... in other words, block signals, do the killing, then unblock?

Sean

  reply	other threads:[~2001-12-17 11:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-14 17:34 [PATCH] kill(-1,sig) Andries.Brouwer
2001-12-14 20:25 ` Linus Torvalds
2001-12-17  9:34   ` Chris Wright
2001-12-17 14:41     ` vda
2001-12-17 11:53       ` Sean Hunter [this message]
2001-12-17 12:06         ` Matthew Kirkwood
2001-12-17 12:30           ` Sean Hunter
2001-12-17 12:16         ` Miquel van Smoorenburg
2001-12-17 16:06         ` vda
2001-12-14 20:36 ` Simon Kirby
2001-12-14 20:40   ` Linus Torvalds
2001-12-14 20:49     ` Simon Kirby
2001-12-15 10:19     ` Albert D. Cahalan
2001-12-15 14:03       ` Martin Josefsson
2001-12-15 23:09       ` Simon Kirby
2001-12-16  8:26         ` Albert D. Cahalan
2001-12-17  8:50     ` Helge Hafting
2001-12-17 20:51     ` Udo A. Steinberg
2001-12-17 21:13       ` Linus Torvalds
2001-12-17 22:06         ` Richard B. Johnson
2001-12-18 17:27   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2001-12-14 21:22 Andries.Brouwer
2001-12-17  7:01 Richard Gooch
2001-12-17 11:41 ` vda
2001-12-17 16:41   ` Richard Gooch
2001-12-17 23:38 Andries.Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011217115344.C14112@dev.sportingbet.com \
    --to=sean@dev.sportingbet.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=chris@wirex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox