blob: 6eb7827f73852b4ad7a4784f401931e8848501a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
static int RELABSD_RUN = 1;
static void interrupt (int unused_mandatory_parameter)
{
RELABSD_RUN = 0;
RELABSD_S_WARNING("Interrupted, will exit at the next input device event.");
}
static int set_signal_handlers ()
{
RELABSD_S_DEBUG(RELABSD_DEBUG_PROGRAM_FLOW, "Setting signal handlers.");
if (signal(SIGINT, interrupt) == SIG_ERR)
{
RELABSD_S_FATAL("Unable to set the SIGINT signal handler.");
return -1;
}
return 0;
}
|