[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-17-g11bbd99
by NIIBE Yutaka
cvs at cvs.gnupg.org
Mon Mar 19 08:39:22 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 11bbd99477ef5ba5b7db0c17607b10af03c68afb (commit)
from 2c85e202bc30231b9555100dec0c490c60d7b88c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 11bbd99477ef5ba5b7db0c17607b10af03c68afb
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Mon Mar 19 16:36:30 2018 +0900
scd: signal mask should be set just after npth_init.
* scd/scdaemon.c (setup_signal_mask): New.
(main): Call setup_signal_mask.
(handle_connections): Remove signal mask setup.
--
For new thread, signal mask is inherited by thread creation.
Thus, it is best to setup signal mask just after npth_init.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index e63aca7..8f8a026 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -393,7 +393,21 @@ cleanup (void)
}
}
-
+static void
+setup_signal_mask (void)
+{
+#ifndef HAVE_W32_SYSTEM
+ npth_sigev_init ();
+ npth_sigev_add (SIGHUP);
+ npth_sigev_add (SIGUSR1);
+ npth_sigev_add (SIGUSR2);
+ npth_sigev_add (SIGINT);
+ npth_sigev_add (SIGCONT);
+ npth_sigev_add (SIGTERM);
+ npth_sigev_fini ();
+ main_thread_pid = getpid ();
+#endif
+}
int
main (int argc, char **argv )
@@ -744,6 +758,7 @@ main (int argc, char **argv )
#endif
npth_init ();
+ setup_signal_mask ();
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
/* If --debug-allow-core-dump has been given we also need to
@@ -884,6 +899,7 @@ main (int argc, char **argv )
/* This is the child. */
npth_init ();
+ setup_signal_mask ();
gpgrt_set_syscall_clamp (npth_unprotect, npth_protect);
/* Detach from tty and put process into a new session. */
@@ -1290,16 +1306,6 @@ handle_connections (int listen_fd)
events[0] = the_event = h2;
}
}
-#else
- npth_sigev_init ();
- npth_sigev_add (SIGHUP);
- npth_sigev_add (SIGUSR1);
- npth_sigev_add (SIGUSR2);
- npth_sigev_add (SIGINT);
- npth_sigev_add (SIGCONT);
- npth_sigev_add (SIGTERM);
- npth_sigev_fini ();
- main_thread_pid = getpid ();
#endif
FD_ZERO (&fdset);
-----------------------------------------------------------------------
Summary of changes:
scd/scdaemon.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list