Browse Source

Ensure default behavior for SIGPIPE

* src/tar.c (main): Install default handler for SIGPIPE.
Proposed by Bastian Blank.
Sergey Poznyakoff 15 years ago
parent
commit
0d6720288b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/tar.c

+ 2 - 2
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.  */