From: Marius Gavrilescu Date: Mon, 25 Nov 2013 13:37:52 +0000 (+0200) Subject: Capture compile errors correctly X-Git-Tag: 5999.000_001~44 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=29182594d09e3f84f00746c959fbfbb95c3cc1c4;p=gruntmaster-daemon.git Capture compile errors correctly --- diff --git a/lib/Gruntmaster/Daemon/Format/CPP.pm b/lib/Gruntmaster/Daemon/Format/CPP.pm index 828252a..66deec1 100644 --- a/lib/Gruntmaster/Daemon/Format/CPP.pm +++ b/lib/Gruntmaster/Daemon/Format/CPP.pm @@ -27,7 +27,7 @@ sub prepare{ open my $devnull, devnull; open my $errors, '>compile-error'; - my $ret = open3 $devnull, $errors, $errors, 'g++', '-o', $basename, $name; + my $ret = open3 $devnull, $errors, undef, 'g++', '-o', $basename, $name; local $SIG{ALRM} = sub {kill KILL => $ret}; alarm 5; wait;