about summary refs log tree commit diff
path: root/redo.do
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-06-26 19:00:05 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-06-26 23:46:40 +0200
commitba968f2161ffb4e936c283487249ea28601964c4 (patch)
tree2c44585d978dfd1baace908ccd8636df5729ee3c /redo.do
parent7013b5e384b74bc425f10c88b6f78e3a7a4fd39e (diff)
downloadredo-c-ba968f2161ffb4e936c283487249ea28601964c4.tar.gz
redo-c-ba968f2161ffb4e936c283487249ea28601964c4.tar.xz
redo-c-ba968f2161ffb4e936c283487249ea28601964c4.zip
use blocking/nonblocking reads instead of poll(2) v0.2
Previously, we used a blocking fd for the token pipe and used poll(2) to
see if anything could be read right now in try_procure().  However,
there is a race between poll(2) and the subsequent blocking read(2),
which can result in processes deadlocking when multiple instances
of redo poll at the same time.

Instead, we now make the fd nonblocking when needed, so that the read
either reads or returns immediately if there is nothing to read.

Closes #3.

Closes: #4 [via git-merge-pr]
Diffstat (limited to 'redo.do')
0 files changed, 0 insertions, 0 deletions