Commit Graph

1 Commits

Author SHA1 Message Date
Sven Eckelmann
cb03183284
ebtables: Use flock() for --concurrent option
The previous locking mechanism was not atomic, hence it was possible
that a killed ebtables process would leave the lock file in place which
in turn made future ebtables processes wait indefinitely for the lock to
become free.

Fix this by using flock(). This also simplifies code quite a bit because
there is no need for a custom signal handler or an __exit routine
anymore.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
2018-01-03 19:58:53 +01:00