Re: small problem with kill --queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 July 2014 14:29, Benno Schulenberg <bensberg@xxxxxxxxxxxxx> 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/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux