mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 03:08:31 +00:00
parent
e961385e55
commit
d71da7fc72
13 changed files with 71 additions and 40 deletions
|
@ -723,6 +723,7 @@ static textwindows int WaitForConsole(struct Fd *f, sigset_t waitmask) {
|
|||
int sig;
|
||||
int64_t sem;
|
||||
uint32_t wi, ms = -1;
|
||||
int handler_was_called;
|
||||
if (!__ttyconf.vmin) {
|
||||
if (!__ttyconf.vtime) {
|
||||
return 0; // non-blocking w/o raising eagain
|
||||
|
@ -745,7 +746,7 @@ static textwindows int WaitForConsole(struct Fd *f, sigset_t waitmask) {
|
|||
if (wi != 1) return __winerr(); // wait failed
|
||||
if (!(sig = __sig_get(waitmask))) return eintr();
|
||||
DeliverSignal:
|
||||
int handler_was_called = __sig_relay(sig, SI_KERNEL, waitmask);
|
||||
handler_was_called = __sig_relay(sig, SI_KERNEL, waitmask);
|
||||
if (_check_cancel() == -1) return -1;
|
||||
if (!(handler_was_called & SIG_HANDLED_NO_RESTART)) return -2;
|
||||
return eintr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue