]> Dogcows Code - chaz/tar/commitdiff
Ensure default behavior for SIGPIPE
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 18 Jun 2009 10:05:48 +0000 (13:05 +0300)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 18 Jun 2009 10:05:48 +0000 (13:05 +0300)
* src/tar.c (main): Install default handler for SIGPIPE.
Proposed by Bastian Blank.

src/tar.c

index dbffc2a983be5462ce4ce988d140ac978ef76122..e10b80431c1c60ba5f7fa2ee04b9e0f07310970a 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -2454,10 +2454,10 @@ main (int argc, char **argv)
 
   obstack_init (&argv_stk);
 
-#ifdef SIGCHLD
+  /* Ensure default behavior for some signals */
+  signal (SIGPIPE, SIG_DFL);
   /* System V fork+wait does not work if SIGCHLD is ignored.  */
   signal (SIGCHLD, SIG_DFL);
-#endif
 
   /* Decode options.  */
 
This page took 0.023671 seconds and 4 git commands to generate.