summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--clientloop.c15
2 files changed, 18 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b97adc72..b7a73ae69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
17 [ssh_config.5 sshconnect.c sshd.c sshd_config.5] 17 [ssh_config.5 sshconnect.c sshd.c sshd_config.5]
18 rename keepalive to tcpkeepalive; the old name causes too much 18 rename keepalive to tcpkeepalive; the old name causes too much
19 confusion; ok djm, dtucker; with help from jmc@ 19 confusion; ok djm, dtucker; with help from jmc@
20 - dtucker@cvs.openbsd.org 2003/12/09 23:45:32
21 [clientloop.c]
22 Clear exit code when ssh -N is terminated with a SIGTERM. ok markus@
20 23
2120031209 2420031209
22 - (dtucker) OpenBSD CVS Sync 25 - (dtucker) OpenBSD CVS Sync
@@ -1586,4 +1589,4 @@
1586 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1589 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1587 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1590 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1588 1591
1589$Id: ChangeLog,v 1.3143 2003/12/17 05:31:10 djm Exp $ 1592$Id: ChangeLog,v 1.3144 2003/12/17 05:31:53 djm Exp $
diff --git a/clientloop.c b/clientloop.c
index e7a7d9fa7..67b9dfcea 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.115 2003/09/23 20:41:11 markus Exp $"); 62RCSID("$OpenBSD: clientloop.c,v 1.116 2003/12/09 23:45:32 dtucker Exp $");
63 63
64#include "ssh.h" 64#include "ssh.h"
65#include "ssh1.h" 65#include "ssh1.h"
@@ -89,6 +89,9 @@ extern Options options;
89/* Flag indicating that stdin should be redirected from /dev/null. */ 89/* Flag indicating that stdin should be redirected from /dev/null. */
90extern int stdin_null_flag; 90extern int stdin_null_flag;
91 91
92/* Flag indicating that no shell has been requested */
93extern int no_shell_flag;
94
92/* 95/*
93 * Name of the host we are connecting to. This is the name given on the 96 * Name of the host we are connecting to. This is the name given on the
94 * command line, or the HostName specified for the user-supplied name in a 97 * command line, or the HostName specified for the user-supplied name in a
@@ -1031,6 +1034,16 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1031 if (!isatty(fileno(stderr))) 1034 if (!isatty(fileno(stderr)))
1032 unset_nonblock(fileno(stderr)); 1035 unset_nonblock(fileno(stderr));
1033 1036
1037 /*
1038 * If there was no shell or command requested, there will be no remote
1039 * exit status to be returned. In that case, clear error code if the
1040 * connection was deliberately terminated at this end.
1041 */
1042 if (no_shell_flag && received_signal == SIGTERM) {
1043 received_signal = 0;
1044 exit_status = 0;
1045 }
1046
1034 if (received_signal) 1047 if (received_signal)
1035 fatal("Killed by signal %d.", (int) received_signal); 1048 fatal("Killed by signal %d.", (int) received_signal);
1036 1049