From 3382df979cd96e15fd77f7c0ba95c39610c93272 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 11 Aug 2011 14:23:39 +0200 Subject: [PATCH] Use sigprocmask instead of sigsetmask. --- ChangeLog | 2 ++ bootstrap.conf | 1 + src/ChangeLog | 3 +++ src/utils.c | 7 ++++--- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef6c4bd9..6372d51e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-08-11 Giuseppe Scrivano + * bootstrap.conf (gnulib_modules): Add `sigprocmask'. + * configure.ac: Do not hardcode GNU TLS and OpenSSL libraries. * bootstrap.conf (gnulib_modules): Include module iconv. diff --git a/bootstrap.conf b/bootstrap.conf index e30c93b4..9753d9dc 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -56,6 +56,7 @@ recv select send setsockopt +sigprocmask sigpipe snprintf socket diff --git a/src/ChangeLog b/src/ChangeLog index 7e877da3..9bd7e889 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-08-11 Giuseppe Scrivano + * utils.c (abort_run_with_timeout): Use sigprocmask instead of + sigsetmask. + * gnutls.c (ssl_connect_wget): Remove call to deprecated function `gnutls_certificate_type_set_priority'. 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); -- 2.39.2