diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2022-09-03 00:27:16 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2022-09-03 00:27:16 -0500 |
commit | 102434e4cbb8ed1b4075f99fb999f092fa068d5b (patch) | |
tree | 2132cf66739f3b554d360e0862926d237166694a /src/libstore/local.mk | |
parent | 0c7f213c87c11c6c0f6b2fa07ba96548f6ea85ad (diff) |
Disable SA_RESTART for some signals on macOS
Disables the SA_RESTART behavior on macOS which causes:
> Restarting of pending calls is requested by setting the SA_RESTART bit
> in sa_flags. The affected system calls include read(2), write(2),
> sendto(2), recvfrom(2), sendmsg(2) and recvmsg(2) on a communications
> channel or a slow device (such as a terminal, but not a regular file)
> and during a wait(2) or ioctl(2).
From: https://man.openbsd.org/sigaction#SA_RESTART
This being set on macOS caused a bug where read() calls to the daemon
socket were blocking after a SIGINT was received. As a result,
checkInterrupt was never reached even though the signal was received
by the signal handler thread.
On Linux, SA_RESTART is disabled by default. This probably effects
other BSDs but I don’t have the ability to test it there right now.
Diffstat (limited to 'src/libstore/local.mk')
0 files changed, 0 insertions, 0 deletions