[talk] kill -0
Raul Cuza
raulcuza at gmail.com
Fri May 10 14:13:27 EDT 2019
On Fri, May 10, 2019 at 2:09 PM Jan Schaumann <jschauma at netmeister.org> wrote:
>
> Raul Cuza <raulcuza at gmail.com> wrote:
>
> > I just had someone submit a shell script using `kill -0 ${PID}` to
> > test if a process is running. It exits non-zero if ${PID} isn't a
> > running process and zero otherwise. But...
> >
> > http://nixdoc.net/man-pages/FreeBSD/kill.1.html says nothing about it.
>
> kill(2) describes this behavior:
>
> "sig may be one of the signals specified in
> sigaction(2) or it may be 0, in which case error
> checking is performed but no signal is actually sent.
> This can be used to check the validity of pid."
>
> -Jan
I will update my brain and not be "that PR reviewer". Thank you!
R.
More information about the talk
mailing list