in reply to Re: Daemon: Need Child to exit if parent dies
in thread Deamon: Need Child to exit if parent dies
That may not work correctly. The parent may exit, and its PID reused before the child gets a change to check, or either process may have changed UID (which is not uncommon for daemons) - the kill 0 will then fail, but all kill 0 tells you is whether the current process can send a signal to the other one - not existence is only one reason why a signal cannot be send.