cfg: Fix implementation of timeout in attempting to lock the config file.
authorBen Pfaff <blp@nicira.com>
Thu, 15 Oct 2009 17:42:59 +0000 (10:42 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 23 Oct 2009 18:52:05 +0000 (11:52 -0700)
commitdc81071d9fe21beaead51a9c0a8d87fbefbfcf56
tree3366c40e379e70881b5e0aaffb6ebd0a78c7bf6c
parente7cfedd6dedab619603ddc3c3832a2b7a0f82f89
cfg: Fix implementation of timeout in attempting to lock the config file.

Without removing SA_RESTART from the SIGALRM handler, the fcntl call will
never return, even after the signal handler is invoked and returns.

We haven't seen a problem in practice, at least not recently, but that's
probably just luck combined with not holding the configuration file lock
for very long.
lib/cfg.c
lib/timeval.c
lib/timeval.h