lix-releng-staging/src/libmain
Matthew Bauer 102434e4cb 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.
2022-09-03 00:27:16 -05:00
..
common-args.cc Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
common-args.hh Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
local.mk Merge pull request #5175 from Pamplemousse/make 2021-08-30 12:44:29 +02:00
loggers.cc Fix progress bar flicker with -L 2022-08-24 22:36:40 +02:00
loggers.hh Capitalize JSON for consistency 2020-10-28 17:54:28 -05:00
nix-main.pc.in pkg-config files: Use c++17 2019-03-14 14:11:12 +01:00
progress-bar.cc Fix progress bar flicker with -L 2022-08-24 22:36:40 +02:00
progress-bar.hh Fix progress bar flicker with -L 2022-08-24 22:36:40 +02:00
shared.cc Disable SA_RESTART for some signals on macOS 2022-09-03 00:27:16 -05:00
shared.hh Remove std::string alias (for real this time) 2022-02-25 16:13:02 +01:00
stack.cc fixes to merged code 2020-05-11 15:52:15 -06:00