diff options
author | Neal Walfield <[email protected]> | 2002-09-05 16:28:31 +0000 |
---|---|---|
committer | Neal Walfield <[email protected]> | 2002-09-05 16:28:31 +0000 |
commit | 32abeed55967358aa2857d5619c776d39e55eeca (patch) | |
tree | 5770665e10a3983326fce29c8af9c48bb8f184ca /agent/gpg-agent.c | |
parent | 2002-09-04 Neal H. Walfield <[email protected]> (diff) | |
download | gnupg-32abeed55967358aa2857d5619c776d39e55eeca.tar.gz gnupg-32abeed55967358aa2857d5619c776d39e55eeca.zip |
2002-09-04 Neal H. Walfield <[email protected]>
* gpg-agent.c (main): Use sigaction, not signal.
Diffstat (limited to 'agent/gpg-agent.c')
-rw-r--r-- | agent/gpg-agent.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index a29737089..91be014a0 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -632,12 +632,18 @@ main (int argc, char **argv ) #ifdef USE_GNU_PTH if (!disable_pth) { + struct sigaction sa; + if (!pth_init ()) { log_error ("failed to initialize the Pth library\n"); exit (1); } - signal (SIGPIPE, SIG_IGN); + + sa.sa_handler = SIG_IGN; + sigemptyset (&sa.sa_mask); + sa.sa_flags = 0; + sigaction (SIGPIPE, &sa, NULL); handle_connections (fd); } else |