nix-daemon: Use a thread instead of SIGPOLL to catch client disconnects
The thread calls poll() to wait until a HUP (or other error event) happens on the client connection. If so, it sends SIGINT to the main thread, which is then cleaned up normally. This is much nicer than messing around with SIGPOLL.
This commit is contained in:
parent
fdee1ced43
commit
49fe9592a4
3 changed files with 51 additions and 146 deletions
1
local.mk
1
local.mk
|
|
@ -5,6 +5,7 @@ endif
|
|||
dist-files += configure config.h.in nix.spec
|
||||
|
||||
GLOBAL_CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr
|
||||
GLOBAL_LDFLAGS += -pthread
|
||||
|
||||
$(foreach i, config.h $(call rwildcard, src/lib*, *.hh), $(eval $(call install-file-in, $(i), $(includedir)/nix, 0644)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue