X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=src%2Futils.c;h=7d4834fba4e42bc93549d6fe2aec8e04f6a13ca1;hb=3382df979cd96e15fd77f7c0ba95c39610c93272;hp=352cdb7b5afc14f02b5f40c7dc85f95d502af5b0;hpb=87a176daa7bb94fe01f8bbcbc7c0730d4a806248;p=wget diff --git a/src/utils.c b/src/utils.c index 352cdb7b..7d4834fb 100644 --- a/src/utils.c +++ b/src/utils.c @@ -875,6 +875,9 @@ acceptable (const char *s) { int l = strlen (s); + if (opt.output_document && strcmp (s, opt.output_document) == 0) + return true; + while (l && s[l] != '/') --l; if (s[l] == '/') @@ -1927,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);