103
103
sigemptyset(&new_action.sa_mask);
104
104
sigaddset(&new_action.sa_mask, SIGINT);
106
105
sigaddset(&new_action.sa_mask, SIGHUP);
107
106
sigaddset(&new_action.sa_mask, SIGTERM);
108
107
sigaction(SIGINT, NULL, &old_action);
109
108
if (old_action.sa_handler != SIG_IGN)
110
109
sigaction(SIGINT, &new_action, NULL);
114
110
sigaction(SIGHUP, NULL, &old_action);
115
111
if (old_action.sa_handler != SIG_IGN)
116
112
sigaction(SIGHUP, &new_action, NULL);