The Samba-Bugzilla – Attachment 1594 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]
patch to prevent lingering processes
hanging_fix.patch (text/plain), 1.55 KB, created by
James Ranson
on 2005-11-26 10:08:37 UTC
(
hide
)
Description:
patch to prevent lingering processes
Filename:
MIME Type:
Creator:
James Ranson
Created:
2005-11-26 10:08:37 UTC
Size:
1.55 KB
patch
obsolete
>diff -C 5 -r 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 Sat Nov 26 11:05:08 2005 >*************** >*** 34,45 **** > * io_start_multiplex_out() and io_start_multiplex_in(). > **/ > > #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; > static int multiplex_in_fd; > static int multiplex_out_fd; >--- 34,45 ---- > * io_start_multiplex_out() and io_start_multiplex_in(). > **/ > > #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; > static int multiplex_in_fd; > static int multiplex_out_fd; >*************** >*** 631,640 **** >--- 631,656 ---- > > if (count <= 0) { > if (errno == EBADF) { > exit_cleanup(RERR_SOCKETIO); > } >+ /* check for a dead socket */ >+ if (is_a_socket(fd)) >+ { >+ char buffer[32]; >+ if (recv(fd, buffer, sizeof buffer, MSG_PEEK) <= 0) >+ { >+ /* Don't try to write errors back >+ * across the stream */ >+ io_multiplexing_close(); >+ rprintf(FERROR, RSYNC_NAME >+ ": writefd_unbuffered failed to write %ld bytes: phase \"%s\": %s\n", >+ (long) len, io_write_phase, >+ strerror(errno)); >+ exit_cleanup(RERR_STREAMIO); >+ } >+ } > continue; > } > > if (io_error_fd != -1 && FD_ISSET(io_error_fd, &r_fds)) { > read_error_fd();
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