Bugzilla – Attachment 1098 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]
Updated patch against 4.3p2
devel4.udiff (text/plain), 2.99 KB, created by
Marc Aurele La France
on 2006-03-13 14:39:57 AEDT
(
hide
)
Description:
Updated patch against 4.3p2
Filename:
MIME Type:
Creator:
Marc Aurele La France
Created:
2006-03-13 14:39:57 AEDT
Size:
2.99 KB
patch
obsolete
>diff -aENpRru -x CVS openssh-4.3p2/channels.c devel4/channels.c >--- openssh-4.3p2/channels.c Tue Jan 31 03:47:15 2006 >+++ devel4/channels.c Sun Mar 12 13:11:35 2006 >@@ -1418,9 +1418,9 @@ channel_handle_rfd(Channel *c, fd_set * > int len; > > if (c->rfd != -1 && >- FD_ISSET(c->rfd, readset)) { >+ (c->detach_close || FD_ISSET(c->rfd, readset))) { > len = read(c->rfd, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) >+ if (len < 0 && errno == EINTR) > return 1; > if (len <= 0) { > debug2("channel %d: read<=0 rfd %d len %d", >@@ -1564,11 +1564,11 @@ channel_handle_efd(Channel *c, fd_set * > 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", >diff -aENpRru -x CVS openssh-4.3p2/serverloop.c devel4/serverloop.c >--- openssh-4.3p2/serverloop.c Fri Dec 30 22:33:37 2005 >+++ devel4/serverloop.c Sun Mar 12 12:16:58 2006 >@@ -255,6 +255,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, >@@ -292,6 +293,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) >@@ -337,8 +339,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); > } >@@ -381,7 +391,7 @@ process_input(fd_set * readset) > /* Read and buffer any available stdout data from the program. */ > if (!fdout_eof && FD_ISSET(fdout, readset)) { > len = read(fdout, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) { >+ if (len < 0 && errno == EINTR) { > /* do nothing */ > } else if (len <= 0) { > fdout_eof = 1; >@@ -393,7 +403,7 @@ process_input(fd_set * readset) > /* Read and buffer any available stderr data from the program. */ > if (!fderr_eof && FD_ISSET(fderr, readset)) { > len = read(fderr, buf, sizeof(buf)); >- if (len < 0 && (errno == EINTR || errno == EAGAIN)) { >+ if (len < 0 && errno == EINTR) { > /* do nothing */ > } else if (len <= 0) { > fderr_eof = 1;
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