$NetBSD: patch-av,v 1.3 2001/11/23 07:42:38 tron Exp $ --- serverloop.c.orig Wed May 12 13:19:28 1999 +++ serverloop.c Fri Nov 23 08:26:58 2001 @@ -377,10 +377,12 @@ if (channel_max_fd() > max_fd) max_fd = channel_max_fd(); +#if 0 /* Ohh, this sucks so badly I almost weep... */ /* If child has terminated, read as much as is available and then exit. */ if (child_terminated) if (max_time_milliseconds == 0) max_time_milliseconds = 100; +#endif if (idle_timeout != 0 && (max_time_milliseconds == 0 || @@ -421,6 +423,7 @@ FD_ZERO(writeset); } +#if 0 /* Ohh, this sucks so badly I almost weep... */ /* If the child has terminated and there was no data, shutdown all descriptors to it. */ if (ret <= 0 && child_terminated && !child_just_terminated) @@ -442,11 +445,12 @@ fdin = -1; } else +#endif { if (ret == 0) /* Nothing read, timeout expired */ { /* Check if idle_timeout expired ? */ - if (idle_timeout != 0 && !child_terminated && + if (idle_timeout != 0 && !child_terminated && idle_time_last && time(NULL) - idle_time_last > idle_timeout) { /* Yes, kill the child */