coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] kill: with -l,-t list signal 0


From: Bernhard Voelker
Subject: Re: [PATCH] kill: with -l,-t list signal 0
Date: Mon, 23 Dec 2024 17:12:32 +0100
User-agent: Mozilla Thunderbird

On 12/23/24 12:48, Pádraig Brady wrote:
EXIT is kinda helpful, as it pertains to how the shell treats catching it.
I.e. `trap foo 0` and `trap foo EXIT` are equivalent.
I.e. 0 is a pseudo signal triggered when the shell exits.

right, I didn't think about it from the 'trap' angle.

I had a look at that previously but thought
it not worth diverging from glibc for.
We might adjust the glibc description.

Given signal 0 is special is how it's not really sent,
and not really caught, perhaps "Pseudo signal" may be
a better description, but we should broach this with glibc first.

'man 3p kill' says it quite nice ...

   If sig is 0 (the null signal), error checking is performed but no
   signal is actually sent. The null signal can be used to check the validity 
of pid.

... still being a bit imprecise in the last sentence, because it's not only the
"validity of pid", but also if the calling process is allowed to send the signal
(without actually delivering the signal to that process).
E.g. user A can usually not 'kill -0' a process of user B.

FWIW: the Texinfo manual already documents the behavior of `kill -0 ...` quite 
well
in the kill(1) section, but we should add it as well to "@node Signal 
specifications".

Good call. I've squashed the following in:

+1

Thanks & have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]