From dc81071d9fe21beaead51a9c0a8d87fbefbfcf56 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 15 Oct 2009 10:42:59 -0700 Subject: 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/timeval.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/timeval.h') diff --git a/lib/timeval.h b/lib/timeval.h index 7da3b383b..5ba903e3a 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -41,6 +41,8 @@ BUILD_ASSERT_DECL(TYPE_IS_SIGNED(time_t)); #define TIME_UPDATE_INTERVAL 100 void time_init(void); +void time_disable_restart(void); +void time_enable_restart(void); void time_postfork(void); void time_refresh(void); time_t time_now(void); -- cgit v1.2.1