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
This commit is contained in:
Brad Fitzpatrick 2014-09-29 13:28:08 -07:00
parent 259f0ffade
commit 1cfa5958f0
1 changed files with 2 additions and 3 deletions

View File

@ -531,9 +531,8 @@ char* mktempdir(void);
void removeall(char*);
static void
cleanup(void)
rmtemp(void)
{
close(cout);
removeall(tmpdir);
}
@ -548,7 +547,7 @@ hostlinksetup(void)
// create temporary directory and arrange cleanup
if(tmpdir == nil) {
tmpdir = mktempdir();
atexit(cleanup);
atexit(rmtemp);
}
// change our output to temporary object file