From 29182594d09e3f84f00746c959fbfbb95c3cc1c4 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 25 Nov 2013 15:37:52 +0200 Subject: [PATCH] Capture compile errors correctly --- lib/Gruntmaster/Daemon/Format/CPP.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2