Do not try to drain the input pipe before closing the archive.

* src/buffer.c (close_archive): Remove call to
sys_drain_input_pipe. Pass hit_eof as the second
argument to sys_wait_for_child.
* src/common.h (sys_drain_input_pipe): Remove
(sys_wait_for_child): Declare second argument.
* src/system.c (sys_drain_input_pipe): Remove.
(sys_wait_for_child): Take two arguments. The second one helps to
decide whether to tolerate child termination on SIGPIPE.
This commit is contained in:
Sergey Poznyakoff
2008-11-25 12:33:28 +00:00
parent 99e3a2604f
commit 7f6e6e6a3e
4 changed files with 25 additions and 33 deletions

View File

@@ -848,8 +848,6 @@ close_archive (void)
flush_archive ();
}
sys_drain_input_pipe ();
compute_duration ();
if (verify_option)
verify_volume ();
@@ -857,7 +855,7 @@ close_archive (void)
if (rmtclose (archive) != 0)
close_error (*archive_name_cursor);
sys_wait_for_child (child_pid);
sys_wait_for_child (child_pid, hit_eof);
tar_stat_destroy (&current_stat_info);
if (save_name)