Send target's output to stdout rather than to stderr
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 5 Feb 2014 17:45:13 +0000 (18:45 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 5 Feb 2014 17:45:13 +0000 (18:45 +0100)
continuous/gw-setup/run.pl

index befe36e..068c5dd 100755 (executable)
@@ -50,8 +50,8 @@ sub run_boot()
        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);