Commit 1cfa5958 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

undo CL 141840043 / 65e21380cb2a

Unnecessary; covered by https://golang.org/cl/141690043

Verified by jonathan@titanous.com on golang-dev.

««« original CL description
cmd/ld: close outfile before cleanup

This prevents the temporary directory from being leaked when
the linker is run on a FUSE filesystem.

Fixes #8684.

LGTM=bradfitz
R=golang-codereviews, rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/141840043

»»»

LGTM=jonathan, iant
R=iant, jonathan
CC=golang-codereviews
https://golang.org/cl/150250045
parent 259f0ffa
...@@ -531,9 +531,8 @@ char* mktempdir(void); ...@@ -531,9 +531,8 @@ char* mktempdir(void);
void removeall(char*); void removeall(char*);
static void static void
cleanup(void) rmtemp(void)
{ {
close(cout);
removeall(tmpdir); removeall(tmpdir);
} }
...@@ -548,7 +547,7 @@ hostlinksetup(void) ...@@ -548,7 +547,7 @@ hostlinksetup(void)
// create temporary directory and arrange cleanup // create temporary directory and arrange cleanup
if(tmpdir == nil) { if(tmpdir == nil) {
tmpdir = mktempdir(); tmpdir = mktempdir();
atexit(cleanup); atexit(rmtemp);
} }
// change our output to temporary object file // change our output to temporary object file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment