summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-10-15 12:21:32 +1100
committerDamien Miller <djm@mindrot.org>2000-10-15 12:21:32 +1100
commit5993935f76e66c957f02efaa8fc0c8ff8a3f92c9 (patch)
treeb8bc95b6caf3a4eeb66645409be9728c327ea6d9
parentb4df15d1e119994ad1f3e73c1283414d2eb30a5f (diff)
- (djm) Fix ssh2 hang on background processes at logout.
-rw-r--r--ChangeLog3
-rw-r--r--rijndael.h2
-rw-r--r--serverloop.c3
-rw-r--r--session.c4
4 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b37a5fcd..552bcfcaf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120001015
2 - (djm) Fix ssh2 hang on background processes at logout.
3
120001014 420001014
2 - (bal) Add support for realpath and getcwd for platforms with broken 5 - (bal) Add support for realpath and getcwd for platforms with broken
3 or missing realpath implementations for sftp-server. 6 or missing realpath implementations for sftp-server.
diff --git a/rijndael.h b/rijndael.h
index c13f18c95..09c425742 100644
--- a/rijndael.h
+++ b/rijndael.h
@@ -1,6 +1,8 @@
1#ifndef _RIJNDAEL_H_ 1#ifndef _RIJNDAEL_H_
2#define _RIJNDAEL_H_ 2#define _RIJNDAEL_H_
3 3
4#include "config.h"
5
4/* 1. Standard types for AES cryptography source code */ 6/* 1. Standard types for AES cryptography source code */
5 7
6typedef u_int8_t u1byte; /* an 8 bit unsigned character type */ 8typedef u_int8_t u1byte; /* an 8 bit unsigned character type */
diff --git a/serverloop.c b/serverloop.c
index 25320348b..0c07a2821 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -671,7 +671,8 @@ server_loop2(void)
671 if (packet_not_very_much_data_to_write()) 671 if (packet_not_very_much_data_to_write())
672 channel_output_poll(); 672 channel_output_poll();
673 wait_until_can_do_something(&readset, &writeset, 0); 673 wait_until_can_do_something(&readset, &writeset, 0);
674 if (child_terminated) { 674 if (child_terminated && child_has_selected) {
675 /* XXX: race - assumes only one child has terminated */
675 while ((pid = waitpid(-1, &status, WNOHANG)) > 0) 676 while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
676 session_close_by_pid(pid, status); 677 session_close_by_pid(pid, status);
677 child_terminated = 0; 678 child_terminated = 0;
diff --git a/session.c b/session.c
index a12e2a0d8..9a213923c 100644
--- a/session.c
+++ b/session.c
@@ -1846,9 +1846,13 @@ session_exit_message(Session *s, int status)
1846 * interested in data we write. 1846 * interested in data we write.
1847 * Note that we must not call 'chan_read_failed', since there could 1847 * Note that we must not call 'chan_read_failed', since there could
1848 * be some more data waiting in the pipe. 1848 * be some more data waiting in the pipe.
1849 * djm - This is no longer true as we have allowed one pass through
1850 * the select loop before killing the connection
1849 */ 1851 */
1850 if (c->ostate != CHAN_OUTPUT_CLOSED) 1852 if (c->ostate != CHAN_OUTPUT_CLOSED)
1851 chan_write_failed(c); 1853 chan_write_failed(c);
1854 if (c->istate != CHAN_INPUT_CLOSED)
1855 chan_read_failed(c);
1852 s->chanid = -1; 1856 s->chanid = -1;
1853} 1857}
1854 1858