You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\john\AppData\Local\go-build
set GOENV=C:\Users\john\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\john\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\john\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\john\AppData\Local\Temp\go-build217132790=/tmp/go-build -gno-record-gcc-switches
I expected to see the temp file removed, but it remains after the program has ended. I tried this same code on a Raspberry Pi with go1.15.3 and also with go1.14.2 linux/arm. The temp file gets removed with those 2 compilers running under Raspbian GNU/Linux 10 (buster)
This problem is occurring on Windows 10.0.17763.1518
What did you see instead?
Under Win 10, the temp file is not removed. Under Linux, it is. I am also using the built-in Microsoft AV.
The text was updated successfully, but these errors were encountered:
What if you file.Close() before removing? I understand Windows is not fond of removing files when they are open. Not sure if that would apply here or not.
Please check the error return values of both Remove and Close, they may explain what is going on.
zzz.038806879
remove zzz.038806879: The process cannot access the file because it is being used by another process.
I agree with your understanding about Windows not being fond of removing open files. Since this appears to be an OS issue and not an issue with golang, I am going to close this issue.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
I expected to see the temp file removed, but it remains after the program has ended. I tried this same code on a Raspberry Pi with
go1.15.3
and also withgo1.14.2 linux/arm
. The temp file gets removed with those 2 compilers running underRaspbian GNU/Linux 10 (buster)
This problem is occurring on
Windows 10.0.17763.1518
What did you see instead?
Under Win 10, the temp file is not removed. Under Linux, it is. I am also using the built-in Microsoft AV.
The text was updated successfully, but these errors were encountered: