mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
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 23:54:28 +0100	[thread overview]
Message-ID: <20090521235428.53b71862@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1242944179.10298.11.camel@odie.local>

> It may be that POSIX is weakly worded enough that either allowing or
> disallowing this behavior is valid.  I think that allowing it is a
> violation of POSIX, but I can find no single, explicit, direct statement
> in POSIX to back this up.

If there was a specific explicit statement it might be an argument to add
a separate poxix_kill(), but the existing kill(2) interface the kernel
has is API, its been that way forever and you need *very* strong reasons
to make such changes that might break things.

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
- Changing it doesn't break existing applications

> There is at least one other argument to disallow this behavior even if
> it is not technically illegal.  Consider the traditional, widespread
> convention of pid files.  This behavior drastically reduces their
> utility, as it greatly increases the chance of PID collisions, a case in
> which it is difficult to automatically (that is, without human
> intervention) recognize that a pid file no longer corresponds to a
> running process which created it.  This is the case in which I
> encountered the behavior - when it repeatedly caused services not to
> restart because they encountered a thread of another process and
> misinterpreted it to mean the service was already running.

Either your pid files are secure, or they are not. If collisions can
occur by accident I can cause them deliberately. If I can cause them
deliberately your system is insecure and you need to fix it.


  reply	other threads:[~2009-05-21 22:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 22:16 Simon Holm Thøgersen
2009-05-21 22:54 ` Alan Cox [this message]
2009-05-21 23:11   ` Chris Friesen
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=20090521235428.53b71862@lxorguk.ukuu.org.uk \
    --to=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

all inboxes | Powered by JetHome®