diff options
author | 2002-09-19 01:58:18 +0000 | |
---|---|---|
committer | 2002-09-19 01:58:18 +0000 | |
commit | 09153e3c4f18ba676bb9b056b56689de8f9ab3fa (patch) | |
tree | a79bc0ac8728ae7b56acb68b9cc457bb2f2458dc /usr.bin/ssh/ssh.c | |
parent | build sparc64 like sparc is built. includes config/xm-openbsd.h (diff) | |
download | wireguard-openbsd-09153e3c4f18ba676bb9b056b56689de8f9ab3fa.tar.xz wireguard-openbsd-09153e3c4f18ba676bb9b056b56689de8f9ab3fa.zip |
bugzilla.mindrot.org #223 - ProxyCommands don't exit.
Patch from dtucker@zip.com.au; ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 8aef4a9fc03..3d0f1341a9c 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -40,7 +40,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.185 2002/09/11 18:27:26 stevesk Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.186 2002/09/19 01:58:18 djm Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -138,6 +138,9 @@ int subsystem_flag = 0; /* # of replies received for global requests */ static int client_global_request_id = 0; +/* pid of proxycommand child process */ +pid_t proxy_command_pid = 0; + /* Prints a help message to the user. This function never returns. */ static void @@ -698,6 +701,14 @@ again: exit_status = compat20 ? ssh_session2() : ssh_session(); packet_close(); + + /* + * Send SIGHUP to proxy command if used. We don't wait() in + * case it hangs and instead rely on init to reap the child + */ + if (proxy_command_pid > 1) + kill(proxy_command_pid, SIGHUP); + return exit_status; } |