2002-09-04 Neal H. Walfield <neal@g10code.de>
authorNeal Walfield <neal@walfield.org>
Thu, 5 Sep 2002 16:28:31 +0000 (16:28 +0000)
committerNeal Walfield <neal@walfield.org>
Thu, 5 Sep 2002 16:28:31 +0000 (16:28 +0000)
* gpg-agent.c (main): Use sigaction, not signal.

agent/ChangeLog
agent/gpg-agent.c

index 1fa3047..21515b8 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-04  Neal H. Walfield  <neal@g10code.de>
+
+       * gpg-agent.c (main): Use sigaction, not signal.
+
 2002-09-03  Neal H. Walfield  <neal@g10code.de>
 
        * findkey.c: Include <fcntl.h>.
index a297370..91be014 100644 (file)
@@ -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