about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2013-03-18T15·13-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-30T19·25+0200
commite87d1a63bdef0ae08f2d94d67fd8daa8fbb63fb4 (patch)
treef11f69737ce5fce6b9e7c0d62865cf6b640ae636 /src/libexpr/eval.cc
parent7cf539c728b8f2a4478c0384d3174842e1e0cced (diff)
killUser: Don't let the child kill itself on Apple
The kill(2) in Apple's libc follows POSIX semantics, which means that
kill(-1, SIGKILL) will kill the calling process too. Since nix has no
way to distinguish between the process successfully killing everything
and the process being killed by a rogue builder in that case, it can't
safely conclude that killUser was successful.

Luckily, the actual kill syscall takes a parameter that determines
whether POSIX semantics are followed, so we can call that syscall
directly and avoid the issue on Apple.

Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'src/libexpr/eval.cc')
0 files changed, 0 insertions, 0 deletions