diff options
author | 2011-01-06 23:01:35 +0000 | |
---|---|---|
committer | 2011-01-06 23:01:35 +0000 | |
commit | 739f872d2bdc61c3e5044507824a165c2e3e5df7 (patch) | |
tree | 4069c4ed0cf8780a7fc6c87581404a8405411b03 /usr.bin/ssh/sshconnect.c | |
parent | For very large operations in randomread(), use a local rc4 instance (diff) | |
download | wireguard-openbsd-739f872d2bdc61c3e5044507824a165c2e3e5df7.tar.xz wireguard-openbsd-739f872d2bdc61c3e5044507824a165c2e3e5df7.zip |
reset SIGCHLD handler to SIG_DFL when execuring LocalCommand;
ok markus@
Diffstat (limited to 'usr.bin/ssh/sshconnect.c')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 15a761e74c7..719389ff91b 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.230 2010/12/14 11:59:06 markus Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.231 2011/01/06 23:01:35 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1233,6 +1233,7 @@ ssh_local_cmd(const char *args) char *shell; pid_t pid; int status; + void (*osighand)(int); if (!options.permit_local_command || args == NULL || !*args) @@ -1241,6 +1242,7 @@ ssh_local_cmd(const char *args) if ((shell = getenv("SHELL")) == NULL || *shell == '\0') shell = _PATH_BSHELL; + osighand = signal(SIGCHLD, SIG_DFL); pid = fork(); if (pid == 0) { debug3("Executing %s -c \"%s\"", shell, args); @@ -1253,6 +1255,7 @@ ssh_local_cmd(const char *args) while (waitpid(pid, &status, 0) == -1) if (errno != EINTR) fatal("Couldn't wait for child: %s", strerror(errno)); + signal(SIGCHLD, osighand); if (!WIFEXITED(status)) return (1); |