equal
deleted
inserted
replaced
422 } |
422 } |
423 |
423 |
424 sub exec_validate { |
424 sub exec_validate { |
425 |
425 |
426 my $pid = fork // die "Can't fork: $!\n"; |
426 my $pid = fork // die "Can't fork: $!\n"; |
|
427 open(STDOUT, '>', '/dev/null') |
|
428 or die "Can't redirect STDOUT to /dev/null: $!\n"; |
427 |
429 |
428 # the first part goes into restore |
430 # the first part goes into restore |
429 # but restore stops reading after the directory |
431 # but restore stops reading after the directory |
430 if (not $pid) { |
432 if (not $pid) { |
431 exec 'restore', '-tf', '-'; |
433 exec 'restore', '-tf', '-'; |
434 waitpid($pid, 0); |
436 waitpid($pid, 0); |
435 die $? if $?; |
437 die $? if $?; |
436 |
438 |
437 # read the remaining dump via cat, I think, |
439 # read the remaining dump via cat, I think, |
438 # nobody is fast than cat |
440 # nobody is fast than cat |
439 open(STDOUT, '>', '/dev/null') |
|
440 or die "Can't redirect STDOUT to >/dev/null: $!\n"; |
|
441 exec 'cat'; |
441 exec 'cat'; |
442 die "Can't exec `cat': $!\n"; |
442 die "Can't exec `cat': $!\n"; |
443 } |
443 } |
444 |
444 |
445 sub device { |
445 sub device { |