summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:01:55 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:01:55 +0000
commitf49dbff61d9729962b91b293ec65d85d810dbd26 (patch)
treec34d7779dffeeb6e429a0a7367794083540f2f1f
parent44adb8fed9214d209eb8d7d47d5adb053c69f190 (diff)
- markus@cvs.openbsd.org 2002/11/18 16:43:44
[clientloop.c] don't overwrite SIG{INT,QUIT,TERM} handler if set to SIG_IGN; e.g. if ssh is used for backup; report Joerg Schilling; ok millert@
-rw-r--r--ChangeLog6
-rw-r--r--clientloop.c16
2 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 3eed9b8c2..2c9165158 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
6 Simplify the code and check for errors using fstat(2). 6 Simplify the code and check for errors using fstat(2).
7 7
8 Problem reported by Mauricio Sanchez, markus@ ok. 8 Problem reported by Mauricio Sanchez, markus@ ok.
9 - markus@cvs.openbsd.org 2002/11/18 16:43:44
10 [clientloop.c]
11 don't overwrite SIG{INT,QUIT,TERM} handler if set to SIG_IGN;
12 e.g. if ssh is used for backup; report Joerg Schilling; ok millert@
9 13
1020021205 1420021205
11 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org 15 - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
@@ -841,4 +845,4 @@
841 save auth method before monitor_reset_key_state(); bugzilla bug #284; 845 save auth method before monitor_reset_key_state(); bugzilla bug #284;
842 ok provos@ 846 ok provos@
843 847
844$Id: ChangeLog,v 1.2516 2002/12/23 02:00:23 mouring Exp $ 848$Id: ChangeLog,v 1.2517 2002/12/23 02:01:55 mouring Exp $
diff --git a/clientloop.c b/clientloop.c
index 2c030e71b..fcd75d2d7 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
59 */ 59 */
60 60
61#include "includes.h" 61#include "includes.h"
62RCSID("$OpenBSD: clientloop.c,v 1.104 2002/08/22 19:38:42 stevesk Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.105 2002/11/18 16:43:44 markus Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -888,10 +888,16 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
888 888
889 client_init_dispatch(); 889 client_init_dispatch();
890 890
891 /* Set signal handlers to restore non-blocking mode. */ 891 /*
892 signal(SIGINT, signal_handler); 892 * Set signal handlers, (e.g. to restore non-blocking mode)
893 signal(SIGQUIT, signal_handler); 893 * but don't overwrite SIG_IGN, matches behaviour from rsh(1)
894 signal(SIGTERM, signal_handler); 894 */
895 if (signal(SIGINT, SIG_IGN) != SIG_IGN)
896 signal(SIGINT, signal_handler);
897 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
898 signal(SIGQUIT, signal_handler);
899 if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
900 signal(SIGTERM, signal_handler);
895 if (have_pty) 901 if (have_pty)
896 signal(SIGWINCH, window_change_handler); 902 signal(SIGWINCH, window_change_handler);
897 903