public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: kerolasa@iki.fi
Subject: Re: small problem with kill --queue
Date: Wed,  9 Jul 2014 21:49:02 +0100	[thread overview]
Message-ID: <1404938943-2543-1-git-send-email-kerolasa@iki.fi> (raw)
In-Reply-To: <1404912546.1512.139736225.71C7CA63@webmail.messagingengine.com>

On 9 July 2014 14:29, Benno Schulenberg <bensberg@justemail.net> wrote:
> On Tue, Jul 8, 2014, at 00:39, Sami Kerola wrote:
>> Right. I am not sure did I mess up or someone else earlier when
>> --queue was introduced.
>
> It looks like you made the mistaken change four months ago,
> in commit 9e8dffd5cd29f03029b1ac99eecb129532ca5c0f.

Yep. Another bug I created. Oops & sorry.

>> Which way ever that was now when I look
>> sigqueue(3) manual page your change proposal makes sense. Please have
>> a look of the change below, that I hope to get reviewed before the
>> final v2.25 is out. [...]
>>
>> +The
>> +.B \-\-queue
>> +should be combined with
>> +.BI \-\-signal " signal"
>> +when other than a SIGTERM is wanted to accompanied with
>> +.IR sigval .
>
> I don't think it's necessary to explain again that wanting to send any
> other signal than TERM requires the --signal option; this is already at
> the top of the page.
>
> Also, thinking again, this word "sigval" looks far too similar to "signal",
> it would be much clearer to use the plain word "value" instead.  So my
> upcoming patches for the usage text and man page use that instead.

I tried to think possible person who is trying to write program(s) that
would use the kill --queue mechanism.  Maybe it is good enoug for such
persons to find this email conversation from web archive, with remark the
--queue <value> is the same value as in

sigaction(3p) SA_SIGINFO void func(int signo, siginfo_t *info, void *context);

the 'si_value' value in 'siginfo_t' struture,  and in sigqueue(3)

int sigqueue(pid_t pid, int sig, const union sigval value);

the 'int sival_int' in 'union sigval'.

That said, the following patch looks good to me.

[PATCH 2/2] docs: fix many wording and some formatting issues in the man page of kill

>> + ctl->sigdata.sival_int = strtos32_or_err(arg, _("argument error"));
>
> Maybe "argument of --queue must be an integer" instead?
>
> My patch to kill.c also improves the error message when the
> signal name or number cannot be interpreted.  Currently:
>
> ./kill --sigmal HUP foobar
> kill: invalid sigval argument
>
> Huh?
>
> New:
>
> ./kill --sigmal HUP foobar
> kill: invalid signal name or number: -sigmal

You took care of this already.

[PATCH 1/2] textual: fix the usage message of kill

Incoming change from me[*] is intented to be applied on top of the
textual fix.

[*] [PATCH] kill: use --queue option argument as sigval integer value

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

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

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07 20:34 small problem with kill --queue Benno Schulenberg
2014-07-07 22:39 ` Sami Kerola
2014-07-09 13:29   ` Benno Schulenberg
2014-07-09 20:49     ` Sami Kerola [this message]
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=1404938943-2543-1-git-send-email-kerolasa@iki.fi \
    --to=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