diff options
-rw-r--r-- | qarshd.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -51,6 +51,7 @@ int debug = 0; /* Globals */ struct sockaddr_storage peername; int child_exitted = 0; +sigset_t orig_sigmask; /* A mini cache for rstat so we can check it in pushfile */ char *saved_path = NULL; @@ -105,6 +106,7 @@ run_cmd(const char *cmd, int p_in, int p_out, int p_err) if (pid == 0) { /* child */ setpgrp(); + sigprocmask(SIG_SETMASK, &orig_sigmask, NULL); /* Connect stdin, stdout, and stderr to qarsh */ new_in = connect_to_peer(&peername, p_in); @@ -251,7 +253,7 @@ handle_packets(int infd) int nfd; struct timespec timeout; struct qa_packet *qp = NULL, *rp = NULL; - sigset_t sigmask, orig_sigmask; + sigset_t sigmask; struct sigaction sa; pid_t child_pid = 0; |