Ensure default behavior for SIGPIPE

* src/tar.c (main): Install default handler for SIGPIPE.
Proposed by Bastian Blank.
This commit is contained in:
Sergey Poznyakoff
2009-06-18 13:05:48 +03:00
parent da760e3faa
commit 0d6720288b

View File

@@ -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. */