diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: ssh.c,v 1.185 2002/09/11 18:27:26 stevesk Exp $"); | 43 | RCSID("$OpenBSD: ssh.c,v 1.186 2002/09/19 01:58:18 djm Exp $"); |
44 | 44 | ||
45 | #include <openssl/evp.h> | 45 | #include <openssl/evp.h> |
46 | #include <openssl/err.h> | 46 | #include <openssl/err.h> |
@@ -146,6 +146,9 @@ int subsystem_flag = 0; | |||
146 | /* # of replies received for global requests */ | 146 | /* # of replies received for global requests */ |
147 | static int client_global_request_id = 0; | 147 | static int client_global_request_id = 0; |
148 | 148 | ||
149 | /* pid of proxycommand child process */ | ||
150 | pid_t proxy_command_pid = 0; | ||
151 | |||
149 | /* Prints a help message to the user. This function never returns. */ | 152 | /* Prints a help message to the user. This function never returns. */ |
150 | 153 | ||
151 | static void | 154 | static void |
@@ -722,6 +725,14 @@ again: | |||
722 | 725 | ||
723 | exit_status = compat20 ? ssh_session2() : ssh_session(); | 726 | exit_status = compat20 ? ssh_session2() : ssh_session(); |
724 | packet_close(); | 727 | packet_close(); |
728 | |||
729 | /* | ||
730 | * Send SIGHUP to proxy command if used. We don't wait() in | ||
731 | * case it hangs and instead rely on init to reap the child | ||
732 | */ | ||
733 | if (proxy_command_pid > 1) | ||
734 | kill(proxy_command_pid, SIGHUP); | ||
735 | |||
725 | return exit_status; | 736 | return exit_status; |
726 | } | 737 | } |
727 | 738 | ||