summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-10-24 08:51:35 +0000
committermarkus <markus@openbsd.org>2001-10-24 08:51:35 +0000
commitbc4ebffa269631aafaf5800a16301d1b631256a3 (patch)
tree215106f473ed2fccfb8acceaf8b621086fc5804a /usr.bin/ssh/ssh.c
parentmention remote port in debug message (diff)
downloadwireguard-openbsd-bc4ebffa269631aafaf5800a16301d1b631256a3.tar.xz
wireguard-openbsd-bc4ebffa269631aafaf5800a16301d1b631256a3.zip
ignore SIGPIPE early, makes ssh work if agent dies, netbsd-pr via itojun@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 5d4b8dc55e7..0934812cf3d 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.148 2001/10/24 08:41:20 markus Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.149 2001/10/24 08:51:35 markus Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -732,6 +732,8 @@ again:
options.user_hostfile2 =
tilde_expand_filename(options.user_hostfile2, original_real_uid);
+ signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE early */
+
/* Log into the remote system. This never returns if the login fails. */
ssh_login(sensitive_data.keys, sensitive_data.nkeys,
host, (struct sockaddr *)&hostaddr, pw);