Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: Server wrapper for watchdog



Hi,

I've finally updated my server wrapper to use the watchdog interface,
to kill the server when it hangs.

The watchdog patch is at
  http://www.informatik.tu-muenchen.de/~stieber/crossfire/watchdog.diffs
The wrapper is at
  http://www.informatik.tu-muenchen.de/~stieber/crossfire/crossfire-loop.c

The wrapper is just a hack. I'm using it on a Solaris machine, and it
seems to work fine. Notable features:
- uses the watchdog interface
- if the server crashes more than 10 times, with the time between
  successive crashes being less than 30 seconds, the wrapper terminates
  itself (to prevent bringing down the machine in case of startup problems)
- the server runs at nice 10

Christian


-- 
Christian Stieber        http://www.informatik.tu-muenchen.de/~stieber