summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2010-10-06 06:39:28 +0000
committerdjm <djm@openbsd.org>2010-10-06 06:39:28 +0000
commita0818857133278c49ff8c8d0eb5cbaf016646192 (patch)
tree251360200214c6c246c1d7039a97f8e798312277 /usr.bin/ssh/ssh.c
parentSkip NULL entries in the sessions list when choosing the next session, (diff)
downloadwireguard-openbsd-a0818857133278c49ff8c8d0eb5cbaf016646192.tar.xz
wireguard-openbsd-a0818857133278c49ff8c8d0eb5cbaf016646192.zip
kill proxy command on fatal() (we already kill it on clean exit);
ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 071c7136d21..741c08c4fa8 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.352 2010/09/20 04:41:47 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.353 2010/10/06 06:39:28 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -174,9 +174,6 @@ int subsystem_flag = 0;
/* # of replies received for global requests */
static int remote_forward_confirms_received = 0;
-/* pid of proxycommand child process */
-pid_t proxy_command_pid = 0;
-
/* mux.c */
extern int muxserver_sock;
extern u_int muxclient_command;
@@ -883,12 +880,8 @@ main(int ac, char **av)
if (options.control_path != NULL && muxserver_sock != -1)
unlink(options.control_path);
- /*
- * 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);
+ /* Kill ProxyCommand if it is running. */
+ ssh_kill_proxy_command();
return exit_status;
}