summaryrefslogtreecommitdiffstats
path: root/qarshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'qarshd.c')
-rw-r--r--qarshd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/qarshd.c b/qarshd.c
index fd4ca08..380a9a3 100644
--- a/qarshd.c
+++ b/qarshd.c
@@ -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;