timeval: Block SIGALRM when sleeping.
authorEthan Jackson <ethan@nicira.com>
Tue, 16 Oct 2012 00:05:35 +0000 (17:05 -0700)
committerEthan Jackson <ethan@nicira.com>
Tue, 16 Oct 2012 22:02:45 +0000 (15:02 -0700)
Commit 00a16895 (timeval: Don't require signals for time_alarm().)
Incorrectly disabled signals when when CACHE_TIME was disabled.  In
fact, the reverse was correct.  As a result of this bug, OVS would
wake once every 100ms unnecessarily.  It shouldn't have affected
correctness otherwise.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/timeval.c

index ea050179fe22564b58ce7919509beff48ec16fa1..302224ac10639f265410a4e8f2133ba4718e9b92 100644 (file)
@@ -375,7 +375,7 @@ time_poll(struct pollfd *pollfds, int n_pollfds, long long int timeout_when,
             break;
         }
 
-        if (!blocked && !CACHE_TIME) {
+        if (!blocked && CACHE_TIME && !backtrace_conn) {
             block_sigalrm(&oldsigs);
             blocked = true;
         }