Minor changes.

* src/tar.c (main): Ignore SIGPIPE.
* src/system.c (sys_child_open_for_compress)
(sys_child_open_for_uncompress): Reset SIGPIPE
in child to default.
* tests/remfiles01.at: Avoid race conditions.
* tests/remfiles02.at: Likewise.
This commit is contained in:
Sergey Poznyakoff
2009-10-14 17:55:15 +03:00
parent 87240ee7c4
commit 0c6c288b53
4 changed files with 22 additions and 10 deletions
+4 -2
View File
@@ -331,7 +331,8 @@ sys_child_open_for_compress (void)
/* The new born child tar is here! */
set_program_name (_("tar (child)"));
signal (SIGPIPE, SIG_DFL);
xdup2 (parent_pipe[PREAD], STDIN_FILENO);
xclose (parent_pipe[PWRITE]);
@@ -474,7 +475,8 @@ sys_child_open_for_uncompress (void)
/* The newborn child tar is here! */
set_program_name (_("tar (child)"));
signal (SIGPIPE, SIG_DFL);
xdup2 (parent_pipe[PWRITE], STDOUT_FILENO);
xclose (parent_pipe[PREAD]);
+1 -1
View File
@@ -2556,7 +2556,7 @@ main (int argc, char **argv)
obstack_init (&argv_stk);
/* Ensure default behavior for some signals */
signal (SIGPIPE, SIG_DFL);
signal (SIGPIPE, SIG_IGN);
/* System V fork+wait does not work if SIGCHLD is ignored. */
signal (SIGCHLD, SIG_DFL);