1
0
mirror of https://github.com/golang/go synced 2024-11-24 08:10:09 -07:00

handle compiler crash better:

need to use exec to avoid seeing
shell output about the crash.

R=iant
DELTA=2  (1 added, 0 deleted, 1 changed)
OCL=35542
CL=35560
This commit is contained in:
Russ Cox 2009-10-09 16:44:40 -07:00
parent c736b6579f
commit 7b5da358ca

View File

@ -30,7 +30,7 @@ close(SRC);
# Run command
$cmd = join(' ', @ARGV);
open(CMD, "$cmd </dev/null 2>&1 |") || die "BUG: errchk: run $cmd: $!";
open(CMD, "exec $cmd </dev/null 2>&1 |") || die "BUG: errchk: run $cmd: $!";
@out = grep { !/^ / } <CMD>;
close CMD;
@ -42,6 +42,7 @@ if($? == 0) {
if(!WIFEXITED($?)) {
print STDERR "BUG: errchk: compiler crashed\n";
print STDERR @out, "\n";
exit 0;
}