]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 51159] Use a non-blocking read with pselect to avoid hangs.
authorPaul Smith <psmith@gnu.org>
Sat, 3 Jun 2017 20:20:51 +0000 (16:20 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 4 Jun 2017 22:37:21 +0000 (18:37 -0400)
commitb552b05251980f693c729e251f93f5225b400714
tree1afa9b76fd5e27e8c8adf399b8c01d95922b792e
parent5345adf82f5d57b0d30a3e8ec8e1c68f91382f21
[SV 51159] Use a non-blocking read with pselect to avoid hangs.

* posixos.c (set_blocking): Set blocking on a file descriptor.
(jobserver_setup): Set non-blocking on the jobserver read side.
(jobserver_parse_auth): Ditto.
(jobserver_acquire_all): Set blocking to avoid a busy-wait loop.
(jobserver_acquire): If the non-blocking read() returns without
taking a token then try again.
posixos.c