From: Ben Pfaff Date: Thu, 9 May 2013 18:26:24 +0000 (-0700) Subject: timeval: Do not block SIGALRM around setting 'deadline' in time_alarm(). X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~159 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a19b84f4a6f0716ff641750c2aa0785c0e6e59b5;p=sliver-openvswitch.git timeval: Do not block SIGALRM around setting 'deadline' in time_alarm(). There is no need to do so because the signal handler does not read or write 'deadline'. Signed-off-by: Ben Pfaff Acked-by: Ethan Jackson --- diff --git a/lib/timeval.c b/lib/timeval.c index f687c9652..d2b7508af 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -326,17 +326,12 @@ time_alarm(unsigned int secs) long long int now; long long int msecs; - sigset_t oldsigs; - time_init(); time_refresh(); now = time_msec(); msecs = secs * 1000LL; - - block_sigalrm(&oldsigs); deadline = now < LLONG_MAX - msecs ? now + msecs : LLONG_MAX; - unblock_sigalrm(&oldsigs); } /* Like poll(), except: