diff options
Diffstat (limited to 'archival/bbunzip.c')
-rw-r--r-- | archival/bbunzip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 9c1a737..853c653 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c @@ -103,7 +103,9 @@ int FAST_FUNC bbunpack(char **argv, status = unpacker(&info); if (status < 0) exitcode = 1; - xclose(STDOUT_FILENO); /* with error check! */ + + if (!(option_mask32 & OPT_STDOUT)) + xclose(STDOUT_FILENO); /* with error check! */ if (filename) { char *del = new_name; @@ -143,6 +145,9 @@ int FAST_FUNC bbunpack(char **argv, } } while (*argv && *++argv); + if (option_mask32 & OPT_STDOUT) + xclose(STDOUT_FILENO); /* with error check! */ + return exitcode; } |