1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

Use sigprocmask instead of sigsetmask.

This commit is contained in:
Giuseppe Scrivano 2011-08-11 14:23:39 +02:00
parent 6330e4f8b8
commit 3382df979c
4 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,7 @@
2011-08-11 Giuseppe Scrivano <gscrivano@gnu.org> 2011-08-11 Giuseppe Scrivano <gscrivano@gnu.org>
* bootstrap.conf (gnulib_modules): Add `sigprocmask'.
* configure.ac: Do not hardcode GNU TLS and OpenSSL libraries. * configure.ac: Do not hardcode GNU TLS and OpenSSL libraries.
* bootstrap.conf (gnulib_modules): Include module iconv. * bootstrap.conf (gnulib_modules): Include module iconv.

View File

@ -56,6 +56,7 @@ recv
select select
send send
setsockopt setsockopt
sigprocmask
sigpipe sigpipe
snprintf snprintf
socket socket

View File

@ -1,5 +1,8 @@
2011-08-11 Giuseppe Scrivano <gscrivano@gnu.org> 2011-08-11 Giuseppe Scrivano <gscrivano@gnu.org>
* utils.c (abort_run_with_timeout): Use sigprocmask instead of
sigsetmask.
* gnutls.c (ssl_connect_wget): Remove call to deprecated function * gnutls.c (ssl_connect_wget): Remove call to deprecated function
`gnutls_certificate_type_set_priority'. `gnutls_certificate_type_set_priority'.

View File

@ -1930,9 +1930,10 @@ abort_run_with_timeout (int sig)
/* We don't have siglongjmp to preserve the set of blocked signals; /* We don't have siglongjmp to preserve the set of blocked signals;
if we longjumped out of the handler at this point, SIGALRM would if we longjumped out of the handler at this point, SIGALRM would
remain blocked. We must unblock it manually. */ remain blocked. We must unblock it manually. */
int mask = siggetmask (); sigset_t set;
mask &= ~sigmask (SIGALRM); sigemptyset (&set);
sigsetmask (mask); sigaddset (&set, SIGALRM);
sigprocmask (SIG_BLOCK, &set, NULL);
/* Now it's safe to longjump. */ /* Now it's safe to longjump. */
longjmp (run_with_timeout_env, -1); longjmp (run_with_timeout_env, -1);