diff options
Diffstat (limited to '')
-rw-r--r-- | zdiff.cc | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 ) |