summaryrefslogtreecommitdiffstats
path: root/perl-install/run_program.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r--perl-install/run_program.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 40a853764..e59286ea9 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -18,7 +18,10 @@ sub rooted {
$root ? $root .= '/' : ($root = '');
- fork and wait, return $? == 0;
+ if (my $pid = fork) {
+ waitpid $pid, 0;
+ return $? == 0;
+ }
{
my ($stdout, $stdoutm, $stderr, $stderrm);
($stdoutm, $stdout, @args) = @args if $args[0] =~ /^>>?$/;