cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Takashi Yano takashi.yano@nifty.ne.jp
Sat Sep 18 11:35:43 GMT 2021


On Sat, 18 Sep 2021 07:12:56 -0400
Ken Brown wrote:
> > It seems that SIGPIPE is handled differently. I guess
> > SIGPIPE is handled by SIG_IGN if the terminal started
> > from xwin-xdg-menu, otherwize, it is handled by SIG_DFL.
> 
> Yes, I remember now that the same issue came up a couple years ago:
> 
>    https://cygwin.com/pipermail/cygwin/2019-August/242060.html
> 
> > Ah, the following patch for xwin-xdg-menu may be the
> > right thing.
> > 
> > --- execute.c.orig	2021-06-23 23:59:37.000000000 +0900
> > +++ execute.c	2021-09-18 16:53:52.144248600 +0900
> > @@ -76,6 +76,7 @@
> >       {
> >           struct rlimit rl;
> >           unsigned int fd;
> > +        int sig;
> >   
> >           /* dup write end of pipes onto stderr and stdout */
> >           close(STDOUT_FILENO);
> > @@ -89,6 +90,10 @@
> >           for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++)
> >               close(fd);
> >   
> > +        /* Set all signal handlers to SIG_DFL. */
> > +        for (sig = 1; sig < NSIG; sig++)
> > +            signal(sig, SIG_DFL);
> > +
> >           /* Disassociate any TTYs */
> >           setsid();
> 
> This may be unnecessarily drastic, given the analysis in my message cited above.

It seems resetting handler only for SIGPIPE is enough according to
the message you posted two years ago. Thanks.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-developers mailing list