pipe hang issue when running as SYSTEM

Takashi Yano takashi.yano@nifty.ne.jp
Fri Mar 25 11:11:04 GMT 2022

On Fri, 25 Mar 2022 00:09:59 -0700 (PDT)
Jeremy Drake wrote:
> On Fri, 25 Mar 2022, Takashi Yano wrote:
> > I can confirm the sample script hangs indeed if the script is
> > running as SYSTEM account. However, in my test, the patch solves
> > the issue.
> >
> > It would be very helpfull if a simple github repository with
> > github actions, which can reproduce the issue, is provided.
> After much fighting with docker on windows,
> https://github.com/jeremyd2019/msys2-pipe-hang-test/runs/5688176578?check_suite_focus=true

Thanks much! I could reproduce the issue even with the patch.
I also noticed what is the cause.

The problem is that the command:
docker run msys2-base c:\msys64\usr\bin\bash -lc "/c/test.sh"
does not allocate tty. Therefore, kill_pgrp(__SIGNONCYGCHLD)
is not called.

If you use:
docker run -t msys2-base c:\msys64\usr\bin\bash -lc "/c/test.sh"
the problem does not occur.

I will submit v3 patch shortly.

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

More information about the Cygwin mailing list