summaryrefslogtreecommitdiffstats
path: root/zcat.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:36 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:36 +0000
commit87a770d4123c1323068a5b3f01c805e715ea3024 (patch)
tree0cad244c41481b67718f1fe42b67f7cb4a223398 /zcat.cc
parentAdding upstream version 0.9~rc1. (diff)
downloadzutils-87a770d4123c1323068a5b3f01c805e715ea3024.tar.xz
zutils-87a770d4123c1323068a5b3f01c805e715ea3024.zip
Adding upstream version 0.9~rc2.upstream/0.9_rc2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'zcat.cc')
-rw-r--r--zcat.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/zcat.cc b/zcat.cc
index 1ead9f4..cb29db9 100644
--- a/zcat.cc
+++ b/zcat.cc
@@ -198,13 +198,13 @@ int cat( int infd, const std::string & input_filename,
int retval = 0;
if( !set_data_feeder( &infd, &pid ) ) retval = 1;
else
- {
retval = do_cat( infd, buffer_size, inbuf, outbuf,
input_filename, cat_options );
+ if( retval == 0 )
if( pid && wait_for_child( pid, "data feeder" ) != 0 ) retval = 1;
+ if( retval == 0 )
if( close( infd ) != 0 )
{ show_close_error( "data feeder" ); retval = 1; }
- }
delete[] inbuf; delete[] outbuf;
return retval;
}