blob: 6fe81ef8e473e255b5c5197c7d943cb0d8c53807 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <signals.h>
3
4 int handle_external_signal(int signal)
5
6DESCRIPTION
7 If the driver receives a signal from the OS it forwards it to the
8 mudlib master by calling this function. The signal received by the
9 driver is given in <signal> and may be one of the following:
10 SIGHUP, SIGINT, SIGTERM, SIGUSR1, SIGUSR2.
11
12 If this function returns != 0, the driver will assume the signal has
13 been dealt with and take NO further action.
14 The exception is SIGTERM, which can't be handled. The driver will
15 perform a graceful shutdown of the game after this function returns.
16
17 If the master does not handle the signal (returns 0 or this function
18 doe not exit), the driver will perform the following default actions:
19
20 SIGHUP: begin a graceful shutdown
21 SIGINT: send itself an unhandled SIGINT. This usually causes an
22 immediate and non-graceful shutdown.
23 SIGUSR1: the driver will reload the master object
24 SIGUSR2: the driver will re-open its debug log file
25 (this will happen the next time the driver writes to it)
26