2008-06-22 Bruno Haible <bruno@clisp.org>
+ * lib/nanosleep.c (rpl_nanosleep): Setup newact only when it is needed.
+
* lib/sigprocmask.c: Update a comment.
2008-06-21 Eric Blake <ebb9@byu.net>
/* set up sig handler */
if (! initialized)
{
- struct sigaction oldact, newact;
- newact.sa_handler = sighandler;
- sigemptyset (&newact.sa_mask);
- newact.sa_flags = 0;
+ struct sigaction oldact;
sigaction (SIGCONT, NULL, &oldact);
if (get_handler (&oldact) != SIG_IGN)
- sigaction (SIGCONT, &newact, NULL);
+ {
+ struct sigaction newact;
+
+ newact.sa_handler = sighandler;
+ sigemptyset (&newact.sa_mask);
+ newact.sa_flags = 0;
+ sigaction (SIGCONT, &newact, NULL);
+ }
initialized = true;
}