- (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2004/06/18 10:40:19
[ssh.c]
delay signal handler setup until we have finished talking to the master.
allow interrupting of setup (e.g. if master is stuck); ok markus@
diff --git a/ssh.c b/ssh.c
index 16284f8..89b0381 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.217 2004/06/17 23:56:57 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.218 2004/06/18 10:40:19 djm Exp $");
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -1256,10 +1256,6 @@
if ((cp = getenv("TERM")) == NULL)
cp = "";
- signal(SIGINT, control_client_sighandler);
- signal(SIGTERM, control_client_sighandler);
- signal(SIGWINCH, control_client_sigrelay);
-
buffer_init(&m);
/* Get PID of controlee */
@@ -1302,6 +1298,10 @@
fatal("%s: master returned error", __func__);
buffer_free(&m);
+ signal(SIGINT, control_client_sighandler);
+ signal(SIGTERM, control_client_sighandler);
+ signal(SIGWINCH, control_client_sigrelay);
+
if (tty_flag)
enter_raw_mode();