c4fb5da278
Previsouly, the following commands hangs: mintty -e timeout 1 dash -c 'yes aaaaaaaaaaaaaaaaaaaaaaaaa | cat' The mechanism is as follows. When the child process (timeout) is terminated, mintty seems to stop reading pty master even if yes or cat still alive. If the the pipe used to transfer output from pty slave to pty master is full due to lack of master reader, WriteFile() to the pipe is blocked. WriteFile() cannot be canceled by cygwin signal, therefore, pty slave hangs. This patch avoids hanging by checking pipe space before calling WriteFile() and prevents writing data more than space. Addresses: https://cygwin.com/pipermail/cygwin/2024-June/256178.html Reported-by: jojelino <jojelino@gmail.com> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> |
||
---|---|---|
.. | ||
CVSChangeLogs.old | ||
cygserver | ||
cygwin | ||
doc | ||
testsuite | ||
utils | ||
CONTRIBUTORS | ||
COPYING | ||
COPYING.LIB | ||
CYGWIN_LICENSE | ||
Makefile.am | ||
Makefile.am.common | ||
README | ||
acinclude.m4 | ||
autogen.sh | ||
configure.ac |
README
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin