The Samba-Bugzilla – Attachment 1604 Details for
Bug 3271
Rsync instances stay in memory when using in daemon mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
even better way of handling a dead socket
hanging_fix3.patch (text/plain), 1.35 KB, created by
James Ranson
on 2005-12-01 19:24:38 UTC
(
hide
)
Description:
even better way of handling a dead socket
Filename:
MIME Type:
Creator:
James Ranson
Created:
2005-12-01 19:24:38 UTC
Size:
1.35 KB
patch
obsolete
>diff -C3 rsync-2.6.0/io.c rsync-2.6.0-patched/io.c >*** rsync-2.6.0/io.c Fri Dec 26 17:04:01 2003 >--- rsync-2.6.0-patched/io.c Thu Dec 1 20:17:53 2005 >*************** >*** 36,43 **** > > #include "rsync.h" > >! /** If no timeout is specified then use a 60 second select timeout */ >! #define SELECT_TIMEOUT 60 > > static int io_multiplexing_out; > static int io_multiplexing_in; >--- 36,43 ---- > > #include "rsync.h" > >! /** If no timeout is specified then use a 5 second select timeout */ >! #define SELECT_TIMEOUT 5 > > static int io_multiplexing_out; > static int io_multiplexing_in; >*************** >*** 633,639 **** > if (errno == EBADF) { > exit_cleanup(RERR_SOCKETIO); > } >! continue; > } > > if (io_error_fd != -1 && FD_ISSET(io_error_fd, &r_fds)) { >--- 633,648 ---- > if (errno == EBADF) { > exit_cleanup(RERR_SOCKETIO); > } >! /* check for a dead socket */ >! if (io_timeout <= 0 && io_error_fd < 0) >! { >! /* The socket may be closed. The only way to know for sure >! * is to try writing. If it is closed, write() will return >! * -1 with errno == EPIPE. If it is not closed, this process >! * will block until the transfer resumes or until the >! * kernel reaps the socket because of timeout. */ >! FD_SET(fd, &w_fds); >! } else continue; > } > > if (io_error_fd != -1 && FD_ISSET(io_error_fd, &r_fds)) {
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 Raw
Actions:
View
Attachments on
bug 3271
:
1580
|
1594
|
1595
|
1604
|
1605