3 ms·
I would like to find a reliable software watchdog that kills a process when a timer expires (for preventing zombie processes from violating lease timeouts).
by senderista 7y ago
I would like to find a reliable software watchdog that kills a process when a timer expires (for preventing zombie processes from violating lease timeouts).
- foota 7y agoI mean, you probably shouldn't rely on the local system time for determining lease timeouts for correctness, if it matters.
- senderista 7y agoI mean something like CLOCK_MONOTONIC.
- foota 7y agoDon't you still need to worry about the clock not going up in pace with others? Like if a system has a lease until "100" but the clock doesn't tick (or more realistically ticks slowly), then another system could think it had the lease if it observed a local system time of 101? Maybe I'm misunderstanding how you're using the leases though.
- senderista 7y agoYes you do, and normally an upper bound epsilon for clock rate skew is explicitly assumed. That's obviously fragile but there are many highly available systems that have managed to get away with it, partly by keeping leases short.
- titzer 7y agoWhy can't you do this which plain old C and the POSIX APIs for timers and process control? i.e. roll your own?