]> andersk Git - openssh.git/commitdiff
- (djm) Fix ssh2 hang on background processes at logout.
authordjm <djm>
Sun, 15 Oct 2000 01:21:32 +0000 (01:21 +0000)
committerdjm <djm>
Sun, 15 Oct 2000 01:21:32 +0000 (01:21 +0000)
ChangeLog
rijndael.h
serverloop.c
session.c

index 9b37a5fcdef650d7a745d3d97845ad5dc53e2da6..552bcfcafd8c4aea94b996bbf46f57dcc37cc171 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+20001015
+ - (djm) Fix ssh2 hang on background processes at logout.
+
 20001014
  - (bal) Add support for realpath and getcwd for platforms with broken
    or missing realpath implementations for sftp-server.
index c13f18c95907e24386d489a896a7ff0503da411c..09c4257423dba71fc5192f070f836df67a79feec 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _RIJNDAEL_H_
 #define _RIJNDAEL_H_
 
+#include "config.h"
+
 /* 1. Standard types for AES cryptography source code               */
 
 typedef u_int8_t   u1byte; /* an 8 bit unsigned character type */
index 25320348b527237f322b7dae32c39d60187cf079..0c07a2821a82da82bdc68a7a213051fd3c142375 100644 (file)
@@ -671,7 +671,8 @@ server_loop2(void)
                if (packet_not_very_much_data_to_write())
                        channel_output_poll();
                wait_until_can_do_something(&readset, &writeset, 0);
-               if (child_terminated) {
+               if (child_terminated && child_has_selected) {
+                       /* XXX: race - assumes only one child has terminated */
                        while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
                                session_close_by_pid(pid, status);
                        child_terminated = 0;
index a12e2a0d8afc84067c8bd10ec348d6be9bb5b95b..9a213923c22e95335e28cf777607b6cca580ccff 100644 (file)
--- a/session.c
+++ b/session.c
@@ -1846,9 +1846,13 @@ session_exit_message(Session *s, int status)
         * interested in data we write.
         * Note that we must not call 'chan_read_failed', since there could
         * be some more data waiting in the pipe.
+        * djm - This is no longer true as we have allowed one pass through 
+        * the select loop before killing the connection
         */
        if (c->ostate != CHAN_OUTPUT_CLOSED)
                chan_write_failed(c);
+       if (c->istate != CHAN_INPUT_CLOSED)
+               chan_read_failed(c);
        s->chanid = -1;
 }
 
This page took 0.055772 seconds and 5 git commands to generate.