diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2024-12-23 03:23:37 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-01-14 20:35:58 +0900 |
commit | a22a0ad7c4f0350a6b144be7718611630c33c503 (patch) | |
tree | 4e1ee4dbec2ec776a969cbc05700a4b83d005362 /newlib/libc/machine/tic80 | |
parent | 74017d229d5e46867c8a3ec01bf653e4392bf14c (diff) | |
download | newlib-main.zip newlib-main.tar.gz newlib-main.tar.bz2 |
Cygwin: signal: Do not handle signal when __SIGFLUSHFAST is sentHEADgithub/mastergithub/mainmastermain
After the commit d243e51ef1d3, zsh sometimes hangs at startup. This
occurs because SIGCHLD, which should trigger sigsuspend(), is handled
in cygwait() that is used to wait for a wakeup event in sig_send(),
even when __SIGFLUSHFAST is sent. Despite __SIGFLUSHFAST being
required to return before handling the signal, this does not happen.
With this patch, if the signal currently being sent is __SIGFLUSHFAST,
do not handle the received signal and keep it asserted after the
cygwait() for the wakeup event. Apply the same logic to the cygwait()
in the retrying loop for WriteFile() as well.
Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256954.html
Fixes: d243e51ef1d3 ("Cygwin: signal: Fix deadlock between main thread and sig thread")
Reported-by: Daisuke Fujimura <booleanlabel@gmail.com>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'newlib/libc/machine/tic80')
0 files changed, 0 insertions, 0 deletions