nspawn: use Barrier API instead of eventfd-util
authorDavid Herrmann <dh.herrmann@gmail.com>
Sun, 13 Jul 2014 10:14:45 +0000 (12:14 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 17 Jul 2014 09:34:25 +0000 (11:34 +0200)
commita2da110b78abe4e4b1b6d8ae4ef78b087c4dcc8b
tree5d0eb4249b4243d9f9c08bfa0a90dda81c19fba7
parent279da1e3f99b9c767a69849b5445e3cfd8d83376
nspawn: use Barrier API instead of eventfd-util

The Barrier-API simplifies cross-fork() synchronization a lot. Replace the
hard-coded eventfd-util implementation and drop it.

Compared to the old API, Barriers also handle exit() of the remote side as
abortion. This way, segfaults will not cause the parent to deadlock.

EINTR handling is currently ignored for any barrier-waits. This can easily
be added, but it isn't needed so far so I dropped it. EINTR handling in
general is ugly, anyway. You need to deal with pselect/ppoll/... variants
and make sure not to unblock signals at the wrong times. So genrally,
there's little use in adding it.
Makefile.am
src/nspawn/nspawn.c
src/shared/eventfd-util.c [deleted file]
src/shared/eventfd-util.h [deleted file]