diff options
author | Shea Levy <shea@shealevy.com> | 2018-03-15T03·45-0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-03-15T03·45-0400 |
commit | d25d9f7cecad24e16b8e831077996e3b50c04468 (patch) | |
tree | 8ab9e6dd958064fbfee14c417dbb259df484f21f /src | |
parent | e2088febf3d0cb1138491c891b134887636e4220 (diff) | |
parent | d98755b0c291fed59c71957ac8dbe4ee94e58b10 (diff) |
Merge branch 'fix/errno-sighandler' of git://github.com/dtzWill/nix
Diffstat (limited to 'src')
-rw-r--r-- | src/nix-daemon/nix-daemon.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc index 890bffa19aa5..30e2b54552ee 100644 --- a/src/nix-daemon/nix-daemon.cc +++ b/src/nix-daemon/nix-daemon.cc @@ -816,8 +816,11 @@ static void processConnection(bool trusted) static void sigChldHandler(int sigNo) { + // Ensure we don't modify errno of whatever we've interrupted + auto saved_errno = errno; /* Reap all dead children. */ while (waitpid(-1, 0, WNOHANG) > 0) ; + errno = saved_errno; } |