summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/clientloop.c b/clientloop.c
index 8b1976171..abfde2f3a 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"
@@ -908,10 +908,16 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
908 908
909 client_init_dispatch(); 909 client_init_dispatch();
910 910
911 /* Set signal handlers to restore non-blocking mode. */ 911 /*
912 signal(SIGINT, signal_handler); 912 * Set signal handlers, (e.g. to restore non-blocking mode)
913 signal(SIGQUIT, signal_handler); 913 * but don't overwrite SIG_IGN, matches behaviour from rsh(1)
914 signal(SIGTERM, signal_handler); 914 */
915 if (signal(SIGINT, SIG_IGN) != SIG_IGN)
916 signal(SIGINT, signal_handler);
917 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
918 signal(SIGQUIT, signal_handler);
919 if (signal(SIGTERM, SIG_IGN) != SIG_IGN)
920 signal(SIGTERM, signal_handler);
915 if (have_pty) 921 if (have_pty)
916 signal(SIGWINCH, window_change_handler); 922 signal(SIGWINCH, window_change_handler);
917 923