X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Futils.c;h=7d4834fba4e42bc93549d6fe2aec8e04f6a13ca1;hp=a43671057085906ef2520cad78c2d58395edc170;hb=3382df979cd96e15fd77f7c0ba95c39610c93272;hpb=6330e4f8b84a03016323be9c1b875eded97e95d7 diff --git a/src/utils.c b/src/utils.c index a4367105..7d4834fb 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1930,9 +1930,10 @@ abort_run_with_timeout (int sig) /* We don't have siglongjmp to preserve the set of blocked signals; if we longjumped out of the handler at this point, SIGALRM would remain blocked. We must unblock it manually. */ - int mask = siggetmask (); - mask &= ~sigmask (SIGALRM); - sigsetmask (mask); + sigset_t set; + sigemptyset (&set); + sigaddset (&set, SIGALRM); + sigprocmask (SIG_BLOCK, &set, NULL); /* Now it's safe to longjump. */ longjmp (run_with_timeout_env, -1);