Re: Detecting process death for anycast named process monitoring

Chris Friesen
2007-05-02T22:31:08Z

Glen Turner wrote:

> The question is, how can a process with no relationship to another
> process detect that process unexpectedly dying? If named goes
> away to a better place, we want to shut down the interface
> which causes Quagga to inject the anycast route.
>
> We don't want to be the parent of the running process, because that
> doesn't add robustness. If the parent process dies, then the service
> dies, and the interface still stays up.
>
> We don't want to poll, because that isn't pretty and the polling
> interval needs to be very short on a big ISP's DNS servers.

We did something similar where arbitrary processes can register to be
sent an arbitrary signal when the state of other processes change. The
caller passes in the pid, the signal to be sent, and an event mask
describing which events you're interested in (stop/start/exit/kill/etc.).

A signal number of 0 means to deregister interest in the specified pid.

Chris