Bugzilla – Attachment 1214 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]
Update Marc's patch to 4.5p1
openssh-4.5p1-bug52.patch (text/plain), 3.14 KB, created by
Darren Tucker
on 2006-11-27 15:07:04 AEDT
(
hide
)
Description:
Update Marc's patch to 4.5p1
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2006-11-27 15:07:04 AEDT
Size:
3.14 KB
patch
obsolete
>Index: channels.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh/channels.c,v >retrieving revision 1.248 >diff -u -p -r1.248 channels.c >--- channels.c 30 Aug 2006 01:07:40 -0000 1.248 >+++ channels.c 27 Nov 2006 03:39:26 -0000 >@@ -1449,10 +1449,10 @@ channel_handle_rfd(Channel *c, fd_set *r > 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)) > return 1; > #ifndef PTY_ZEROREAD > if (len <= 0) { >@@ -1604,11 +1604,11 @@ channel_handle_efd(Channel *c, fd_set *r > 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) > return 1; > if (len <= 0) { > debug2("channel %d: closing read-efd %d", >Index: serverloop.c >=================================================================== >RCS file: /usr/local/src/security/openssh/cvs/openssh/serverloop.c,v >retrieving revision 1.150 >diff -u -p -r1.150 serverloop.c >--- serverloop.c 23 Oct 2006 17:02:41 -0000 1.150 >+++ serverloop.c 27 Nov 2006 03:37:16 -0000 >@@ -280,6 +280,7 @@ wait_until_can_do_something(fd_set **rea > 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 @@ wait_until_can_do_something(fd_set **rea > * 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 @@ wait_until_can_do_something(fd_set **rea > 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 (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,7 @@ process_input(fd_set *readset) > 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) { > /* do nothing */ > #ifndef PTY_ZEROREAD > } else if (len <= 0) { >@@ -425,7 +435,7 @@ process_input(fd_set *readset) > 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) { > /* 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
Actions:
View
|
Diff
Attachments on
bug 52
:
557
|
572
|
667
|
801
|
1075
|
1098
|
1214
|
1215
|
1227
|
1242
|
1243