Bugzilla – Attachment 1227 Details for
Bug 52
ssh hangs on exit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against current 20070121
bug52v2.diff (text/plain), 3.05 KB, created by
Damien Miller
on 2007-01-21 21:08:30 AEDT
(
hide
)
Description:
patch against current 20070121
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2007-01-21 21:08:30 AEDT
Size:
3.05 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /var/cvs/openssh/channels.c,v >retrieving revision 1.250 >diff -u -r1.250 channels.c >--- channels.c 5 Jan 2007 05:30:16 -0000 1.250 >+++ channels.c 21 Jan 2007 10:03:24 -0000 >@@ -1449,10 +1449,11 @@ > int len; > > if (c->rfd != -1 && >- FD_ISSET(c->rfd, readset)) { >+ (c->detach_close || FD_ISSET(c->rfd, readset))) { > errno = 0; > len = read(c->rfd, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) >+ if (len < 0 && (errno == EINTR || >+ (errno == EAGAIN && !(c->isatty && c->detach_close)))) > return 1; > #ifndef PTY_ZEROREAD > if (len <= 0) { >@@ -1604,11 +1605,12 @@ > c->local_consumed += len; > } > } else if (c->extended_usage == CHAN_EXTENDED_READ && >- FD_ISSET(c->efd, readset)) { >+ (c->detach_close || FD_ISSET(c->efd, readset))) { > len = read(c->efd, buf, sizeof(buf)); > debug2("channel %d: read %d from efd %d", > c->self, len, c->efd); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) >+ if (len < 0 && (errno == EINTR || >+ (errno == EAGAIN && !c->detach_close))) > return 1; > if (len <= 0) { > debug2("channel %d: closing read-efd %d", >Index: serverloop.c >=================================================================== >RCS file: /var/cvs/openssh/serverloop.c,v >retrieving revision 1.150 >diff -u -r1.150 serverloop.c >--- serverloop.c 23 Oct 2006 17:02:41 -0000 1.150 >+++ serverloop.c 21 Jan 2007 10:03:24 -0000 >@@ -280,6 +280,7 @@ > struct timeval tv, *tvp; > int ret; > int client_alive_scheduled = 0; >+ int program_alive_scheduled = 0; > > /* > * if using client_alive, set the max timeout accordingly, >@@ -317,6 +318,7 @@ > * the client, try to get some more data from the program. > */ > if (packet_not_very_much_data_to_write()) { >+ program_alive_scheduled = child_terminated; > if (!fdout_eof) > FD_SET(fdout, *readsetp); > if (!fderr_eof) >@@ -362,8 +364,16 @@ > memset(*writesetp, 0, *nallocp); > if (errno != EINTR) > error("select: %.100s", strerror(errno)); >- } else if (ret == 0 && client_alive_scheduled) >- client_alive_check(); >+ } else { >+ if (ret == 0 && client_alive_scheduled) >+ client_alive_check(); >+ if (!compat20 && program_alive_scheduled && fdin_is_tty) { >+ if (!fdout_eof) >+ FD_SET(fdout, *readsetp); >+ if (!fderr_eof) >+ FD_SET(fderr, *readsetp); >+ } >+ } > > notify_done(*readsetp); > } >@@ -407,7 +417,8 @@ > if (!fdout_eof && FD_ISSET(fdout, readset)) { > errno = 0; > len = read(fdout, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) { >+ if (len < 0 && (errno == EINTR || >+ (errno == EAGAIN && !child_terminated))) { > /* do nothing */ > #ifndef PTY_ZEROREAD > } else if (len <= 0) { >@@ -425,7 +436,8 @@ > if (!fderr_eof && FD_ISSET(fderr, readset)) { > errno = 0; > len = read(fderr, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) { >+ if (len < 0 && (errno == EINTR || >+ (errno == EAGAIN && !child_terminated))) { > /* do nothing */ > #ifndef PTY_ZEROREAD > } else if (len <= 0) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 52
:
557
|
572
|
667
|
801
|
1075
|
1098
|
1214
|
1215
| 1227 |
1242
|
1243