mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Emulate Linux socket timeout signaling on Windows
This commit is contained in:
parent
65e425fbca
commit
b14dddcc18
8 changed files with 246 additions and 29 deletions
|
@ -191,6 +191,11 @@ __winsock_block(int64_t handle, uint32_t flags, int nonblock,
|
|||
// check if signal handler without SA_RESTART was called
|
||||
if (handler_was_called & SIG_HANDLED_NO_RESTART)
|
||||
return eintr();
|
||||
|
||||
// emulates linux behavior of having timeouts @norestart
|
||||
if (handler_was_called & SIG_HANDLED_SA_RESTART)
|
||||
if (srwtimeout)
|
||||
return eintr();
|
||||
}
|
||||
|
||||
// otherwise try the i/o operation again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue