public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: "Simon Holm Thøgersen" <odie@cs.aau.dk>
Cc: 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 16:57:09 -0600	[thread overview]
Message-ID: <4A15DC45.5020509@nortel.com> (raw)
In-Reply-To: <1242944179.10298.11.camel@odie.local>

Simon Holm Thøgersen wrote:
> There is a bug report at https://bugs.launchpad.net/bugs/341239 where
> the question is asked. Should it be possible to signal a process with
> kill(2) by passing any of the thread ids belong to the process as
> argument to kill?

Based on POSIX, from the perspective of the kernel I think that a tid
that is not a tgid should result in ESRCH for the kill() syscall.

Such a tid would however be valid for the tgkill or tkill syscalls.

Makes sense to me.  I suspect such a change would break a lot of
not-strictly-compliant programs though.

In the meantime, the pid file scenario could be modified to store both
the tid and pid (using userspace terminology now) and use the tgkill()
syscall.  It should be noted that tgkill() is linux-specific.

Chris

      parent reply	other threads:[~2009-05-21 22:57 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
2009-05-21 22:57 ` Chris Friesen [this message]

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=4A15DC45.5020509@nortel.com \
    --to=cfriesen@nortel.com \
    --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