mirror of
https://github.com/sheumann/hush.git
synced 2025-01-18 07:31:34 +00:00
Bug 601: When we fork an archiver and feed stuff to it through a pipe, if
we don't close the pipe the child process won't exit, and we'll hang in waitpid().
This commit is contained in:
parent
ef1f7b5058
commit
1a78103306
@ -513,11 +513,12 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
|
|||||||
* but that isn't necessary for GNU tar interoperability, and
|
* but that isn't necessary for GNU tar interoperability, and
|
||||||
* so is considered a waste of space */
|
* so is considered a waste of space */
|
||||||
|
|
||||||
|
/* Close so the child process (if any) will exit */
|
||||||
|
close(tbInfo.tarFd);
|
||||||
|
|
||||||
/* Hang up the tools, close up shop, head home */
|
/* Hang up the tools, close up shop, head home */
|
||||||
if (ENABLE_FEATURE_CLEAN_UP) {
|
if (ENABLE_FEATURE_CLEAN_UP)
|
||||||
close(tbInfo.tarFd);
|
|
||||||
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
||||||
}
|
|
||||||
|
|
||||||
if (errorFlag)
|
if (errorFlag)
|
||||||
bb_error_msg("Error exit delayed from previous errors");
|
bb_error_msg("Error exit delayed from previous errors");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user