Skip to content

Commit

Permalink
mxqd: Remove reset_signals
Browse files Browse the repository at this point in the history
It is no longer necessary to reset signals, because we no longer
change them.

The signals may stay blocked for the reaper process and are explicitly
unblocked for the user process.
donald committed Jul 5, 2017
1 parent 7219743 commit 784dcbc
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions mxqd.c
Original file line number Diff line number Diff line change
@@ -701,21 +701,6 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
return 0;
}

static void reset_signals()
{
signal(SIGINT, SIG_DFL);
signal(SIGTERM, SIG_DFL);
signal(SIGQUIT, SIG_DFL);
signal(SIGHUP, SIG_DFL);
signal(SIGTSTP, SIG_DFL);
signal(SIGTTIN, SIG_DFL);
signal(SIGTTOU, SIG_DFL);
signal(SIGCHLD, SIG_DFL);
signal(SIGPIPE, SIG_DFL);
signal(SIGUSR1, SIG_DFL);
signal(SIGUSR2, SIG_DFL);
}

static int init_child_process(struct mxq_group_list *glist, struct mxq_job *job)
{
struct mxq_server *server;
@@ -733,8 +718,6 @@ static int init_child_process(struct mxq_group_list *glist, struct mxq_job *job)
server = glist->user->server;
group = &glist->group;

reset_signals();

sigprocmask(SIG_UNBLOCK,&all_signals,NULL);

passwd = getpwuid(group->user_uid);
@@ -1059,8 +1042,6 @@ int reaper_process(struct mxq_server *server,struct mxq_group_list *glist, struc

group = &glist->group;

reset_signals();

res = setsid();
if (res < 0) {
mx_log_warning("reaper_process setsid: %m");

0 comments on commit 784dcbc

Please sign in to comment.