summaryrefslogtreecommitdiffstats
path: root/zdiff.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:29:58 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:29:58 +0000
commit4646c2987eba0ba70050daf3c9fb450510a30237 (patch)
treeb1312f8c64fd61a3097b553507d00cac44b3c4bd /zdiff.cc
parentAdding debian version 1.1-1. (diff)
downloadzutils-4646c2987eba0ba70050daf3c9fb450510a30237.tar.xz
zutils-4646c2987eba0ba70050daf3c9fb450510a30237.zip
Merging upstream version 1.2~pre2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'zdiff.cc')
-rw-r--r--zdiff.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/zdiff.cc b/zdiff.cc
index 521d55e..3f0d07f 100644
--- a/zdiff.cc
+++ b/zdiff.cc
@@ -389,6 +389,11 @@ int main( const int argc, const char * const argv[] )
set_signals();
if( !set_fifonames( filenames ) ) return 2;
+ Children children[2];
+ if( !set_data_feeder( fifonames[0], infd[0], children[0], format_types[0] ) ||
+ !set_data_feeder( fifonames[1], infd[1], children[1], format_types[1] ) )
+ return 2;
+
const pid_t diff_pid = fork();
if( diff_pid == 0 ) // child (diff)
{
@@ -407,11 +412,6 @@ int main( const int argc, const char * const argv[] )
if( diff_pid < 0 ) // parent
{ show_fork_error( DIFF ); return 2; }
- Children children[2];
- if( !set_data_feeder( fifonames[0], infd[0], children[0], format_types[0] ) ||
- !set_data_feeder( fifonames[1], infd[1], children[1], format_types[1] ) )
- return 2;
-
int retval = wait_for_child( diff_pid, DIFF );
for( int i = 0; i < 2; ++i )