133 |
signal(SIGUSR1, do_wakeup); |
signal(SIGUSR1, do_wakeup); |
134 |
|
|
135 |
/* |
/* |
136 |
|
* Register interest for the SIGINT signal, |
137 |
|
* in case we run as a server but not as a daemon |
138 |
|
* we need to catch this signal if the user pressed |
139 |
|
* CTRL^C in the terminal |
140 |
|
*/ |
141 |
|
signal(SIGINT, do_destroy); |
142 |
|
|
143 |
|
/* |
144 |
* Register interest for the SIGHUP signal, |
* Register interest for the SIGHUP signal, |
145 |
* in case we run in daemon mode this signal |
* in case we run in daemon mode this signal |
146 |
* will reload the configuration. |
* will reload the configuration. |
490 |
Run.stopped= TRUE; |
Run.stopped= TRUE; |
491 |
|
|
492 |
switch(sig) { |
switch(sig) { |
493 |
|
case SIGINT: |
494 |
|
/* Fall trough */ |
495 |
case SIGTERM: |
case SIGTERM: |
496 |
stop_http(); |
stop_http(); |
497 |
if(Run.isdaemon) { |
if(Run.isdaemon) { |