summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2011-01-16 11:50:37 +0000
committerDamien Miller <djm@cvs.openbsd.org>2011-01-16 11:50:37 +0000
commit36c4560494370fa701dc49b41805a3c145c764ae (patch)
tree9176098e064f3e818896f9c6a7ae4759cb8fd465 /usr.bin/ssh
parent99e9c641b20489f3dfebbba185cbbc205fe47f4d (diff)
reset the SIGPIPE handler when forking to execute child processes;
ok dtucker@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/sshconnect.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 719389ff91b..bf0101c4d4e 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.231 2011/01/06 23:01:35 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.232 2011/01/16 11:50:36 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -133,6 +133,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
/* Execute the proxy command. Note that we gave up any
extra privileges above. */
+ signal(SIGPIPE, SIG_DFL);
execv(argv[0], argv);
perror(argv[0]);
exit(1);
@@ -1245,6 +1246,7 @@ ssh_local_cmd(const char *args)
osighand = signal(SIGCHLD, SIG_DFL);
pid = fork();
if (pid == 0) {
+ signal(SIGPIPE, SIG_DFL);
debug3("Executing %s -c \"%s\"", shell, args);
execl(shell, shell, "-c", args, (char *)NULL);
error("Couldn't execute %s -c \"%s\": %s",