> That's because those calls only apply to child processes which is not
> the case with s-s-d --stop.
There are alternative safe ways to detect it, like using ptrace or [1].
A cycle with kill(0) is not safe, another process with the same pid could be 
started between two iterations.

> That behaviour is already supported with the --retry option. But this
> might not cover the case that a parent process in the daemon has
> terminated but not some of its worker childs for example, and that's
> a daemon's issue.
Agreed, but the kill(0) thing is an hack itself which could not work in all 
the situations.

> Then those init scripts are buggy, and should be fixed.
Yes, they should use the --retry instead of the wait.

Bye

[1] http://netsplit.com/2011/02/09/the-proc-connector-and-socket-filters/

-- 
Salvo Tomaselli


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to