setpgrp(); # Start new process group so that we can kill all
# background processes at once
close($boot);
- open(STDOUT, ">&", $wh) || die "Can't dup STDOUT: $!";
- my $cmd = "$bootcmd | tee /dev/stderr";
+ open(STDERR, ">&", $wh) || die "Can't dup STDERR: $!";
+ my $cmd = "$bootcmd 2>&1 | tee /dev/stderr";
exec($cmd) || die "Can't exec $cmd: $!";
}
close($wh);