mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
catch SIGTERM for clean exit
This commit is contained in:
parent
08fa5c12fb
commit
c3c3318b68
1 changed files with 2 additions and 1 deletions
|
@ -4030,7 +4030,7 @@ sigusr1_handler(evutil_socket_t fd, short event, void *arg)
|
|||
static void
|
||||
sigint_handler(int sig)
|
||||
{
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(sig, SIG_DFL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -4421,6 +4421,7 @@ int main(int argc, char **argv)
|
|||
log_set_udata(&mutex_log);
|
||||
log_set_lock(log_lock);
|
||||
signal(SIGINT, sigint_handler);
|
||||
signal(SIGTERM, sigint_handler);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
atexit(cleanup);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue