Page MenuHomeDevCentral

Handle SIGHUP and SIGTERM signals
Closed, ResolvedPublic


Eggdrop code

Custom handlers exists for SIGHUP and SIGQUIT signals.

SIGQUIT is fine: it triggers a .restart after saving user/chan files, an operation deemed safe.

But SIGHUP sends a rehash while we want to use our rehash method instead to handle SQL disconnect (see Tech.tcl).

To implement a custom handler, bind evnt sighup can be used.


In rOPS, edit roles/viperserv/eggdrop/files/rc/eggdrop to add two custom commands:

  • reload to send a SIGHUP signal (kill -1)
  • graceful to send a SIGQUIT signal (kill -3)