diff options
| author | Sami Kerola <kerolasa@iki.fi> | 2014-07-09 21:49:03 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2014-07-14 15:49:35 +0200 |
| commit | a3443c3067027e0155a8135d13a6205528b48cd5 (patch) | |
| tree | 8746ba7833e9dc9c45b803084d31e872d48b9a85 /misc-utils/kill.c | |
| parent | bdef457d34183eb1d8152a6c3950ebfa93986e84 (diff) | |
| download | util-linux-a3443c3067027e0155a8135d13a6205528b48cd5.tar.gz | |
kill: use --queue option argument as sigval integer value
The sigqueue(3) takes two values, signal and sigval. Contents of the
signal can be altered with --signal option argument, so the --queue
argument should be reserved to affect sigval_int.
This is regression fix introduced by commit
9e8dffd5cd29f03029b1ac99eecb129532ca5c0f.
Reference: http://man7.org/linux/man-pages/man3/sigqueue.3.html
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'misc-utils/kill.c')
| -rw-r--r-- | misc-utils/kill.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/misc-utils/kill.c b/misc-utils/kill.c index 5d2f27d09f..a24087f6cb 100644 --- a/misc-utils/kill.c +++ b/misc-utils/kill.c @@ -412,9 +412,7 @@ static char **parse_arguments(int argc, char **argv, struct kill_control *ctl) errx(EXIT_FAILURE, _("%s and %s are mutually exclusive"), "--pid", "--queue"); argc--, argv++; arg = *argv; - if ((ctl->numsig = arg_to_signum(arg, 0)) < 0) - err_nosig(arg); - ctl->sigdata.sival_int = ctl->numsig; + ctl->sigdata.sival_int = strtos32_or_err(arg, _("argument error")); ctl->use_sigval = 1; continue; } |
