From: Russ Cox Date: Thu, 13 Aug 2009 00:58:53 +0000 (-0700) Subject: rm outfile if 6g exits with an error X-Git-Tag: weekly.2009-11-06~890 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d594639087812a57de3c9fc4a9ec73a04f1454c8;p=gostls13.git rm outfile if 6g exits with an error R=ken OCL=33134 CL=33141 --- diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index 771e9c293d..8a4cd80d51 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -60,9 +60,12 @@ fatal(char *fmt, ...) vfprint(1, fmt, arg); va_end(arg); print("\n"); - if(debug['h']) + if(debug['h']) { + if(outfile) + unlink(outfile); *(int*)0 = 0; - exit(1); + } + errorexit(); } void @@ -87,7 +90,7 @@ linehist(char *file, int32 off, int relative) file = cp; } - h = alloc(sizeof(Hist)); + h = mal(sizeof(Hist)); h->name = file; h->line = lineno; h->offset = off;