public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Simon Holm Thøgersen" <odie@cs.aau.dk>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Michael Kerrisk" <mtk.manpages@googlemail.com>,
	"Jean-Paul Calderone" <exarkun@twistedmatrix.com>
Subject: Re: Allow signaling a process by all its thread ids?
Date: Thu, 21 May 2009 17:11:31 -0600	[thread overview]
Message-ID: <4A15DFA3.70802@nortel.com> (raw)
In-Reply-To: <20090521235428.53b71862@lxorguk.ukuu.org.uk>

Alan Cox wrote:

> You need to show that
> - The current API breaks stuff
> - The current API is absolutely invalid in posix
> - Changing it improves the functionality and power of the kernel

I think an argument could be made for these.  A task is not necessarily
a process, and kill() is only defined to send a signal to one or more
processes.  This introduces potential problems if a) it is possible to
send a signal to an individual tid, and b) a tid can be reused in a
different process.

We already have the tgkill() syscall, which fixes the ambiguity by
specifying both the pid and tid.  This is what pthread_kill() uses under
the hood.  The fact that it was seen as necessary (back in 2.5)
indicates that there are problems with kill() as currently implemented.

> - Changing it doesn't break existing applications

This last one is the kicker.  As I mentioned in my other reply, I
suspect that making such a change would break a lot of (not-quite-POSIX)
applications that assume they can send a signal to particular threads
using kill().

I see analogies to the whole fsync() issue.

Chris

  reply	other threads:[~2009-05-21 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 22:16 Allow signaling a process by all its thread ids? Simon Holm Thøgersen
2009-05-21 22:54 ` Alan Cox
2009-05-21 23:11   ` Chris Friesen [this message]
2009-05-21 22:57 ` Chris Friesen

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=4A15DFA3.70802@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=exarkun@twistedmatrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@googlemail.com \
    --cc=odie@cs.aau.dk \
    /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