public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Benno Schulenberg <bensberg@justemail.net>
To: "Util-Linux" <util-linux@vger.kernel.org>
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: small problem with kill --queue
Date: Mon, 07 Jul 2014 22:34:55 +0200	[thread overview]
Message-ID: <1404765295.16902.139036593.3B689FEB@webmail.messagingengine.com> (raw)


Hello Sami,

./kill --queue 11 12
kill: sending signal to 12 failed: Operation not permitted

/kill --queue data 12
kill: unknown signal data; valid signals:
 1 HUP      2 INT      3 QUIT     4 ILL      5 TRAP     [...]

But "data" is not a signal, it is meant to be a number, an integer,
a value passed to the signalled process.

In misc-utils.c it does this:

        arg = *argv;
        if ((ctl->numsig = arg_to_signum(arg, 0)) < 0)
                err_nosig(arg);

But it should not run arg_to_signum() on the argument, it
should simply parse it as an integer, and when that fails,
it should not call err_nosig() but say something like "not
a number".  Right?

Benno

-- 
http://www.fastmail.fm - mmm... Fastmail...


             reply	other threads:[~2014-07-07 20:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 20:34 Benno Schulenberg [this message]
2014-07-07 22:39 ` small problem with kill --queue Sami Kerola
2014-07-09 13:29   ` Benno Schulenberg
2014-07-09 20:49     ` Sami Kerola
2014-07-09 20:49       ` [PATCH] kill: use --queue option argument as sigval integer value Sami Kerola
2014-07-14 13:51         ` Karel Zak

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=1404765295.16902.139036593.3B689FEB@webmail.messagingengine.com \
    --to=bensberg@justemail.net \
    --cc=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /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