[PATCH] rsync on cygwin - textmode config files
Ville Herva
vherva at niksula.hut.fi
Wed Feb 20 21:14:20 EST 2002
On Wed, Feb 20, 2002 at 08:27:07AM +0200, [Ville Herva] wrote:
>
> (2) Secondly, if I connect to rsync daemon from another machine and hit
> ctrl-c at the client end during transfer, the rsync daemon exists (not
> just the connection handler process, but every rsync). I guess this is
> because rsync gets sigpipe signal, which is handled by sig_int, which
> in turn sends sigusr to the parent. I have no idea why this should be.
> I changed sigpipe handler to SIG_IGN, and I now get the behaviour I
> want: if there is a network error (such as premature socket closing)
> the rysnc daemon won't die, and I can reconnect to it. I didn't do
> this cleanly: the connection handler process should in fact exit
> (perhaps after some clean up), but not the parent. This is not a
> problem, however, since the parent will reap the connection handler
> after a minute.
>
> This I'm not sure about. Does more recent cygwin handle this better? I'll
> try it without the patch and try to reproduce the bug I was seeing back
> then.
Ok, from 2.5.2 -> 2.5.3pre1:
signal(SIGINT,SIGNAL_CAST sig_int);
- signal(SIGPIPE,SIGNAL_CAST sig_int);
signal(SIGHUP,SIGNAL_CAST sig_int);
signal(SIGTERM,SIGNAL_CAST sig_int);
+ /* Ignore SIGPIPE; we consistently check error codes and will
+ * see the EPIPE. */
+ signal(SIGPIPE, SIG_IGN);
So mainline does the same thing nowadays (the "consistently check error
codes and will see the EPIPE" was something I propably didn't do, anyway).
-- v --
v at iki.fi
More information about the rsync
mailing list