mirror of https://github.com/golang/go.git
cmd/link: actually close the output file
When the output file is mmap'd, OutBuf.Close currently munmap the file but doesn't actually close the file descriptor. This CL makes it actually close the FD. Change-Id: I053c5592ae95497228c50ce6a267b3b48f0af6d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/235417 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
c0e8e405c0
commit
902d8de79e
|
|
@ -115,7 +115,6 @@ func (out *OutBuf) Close() error {
|
|||
if out.isMmapped() {
|
||||
out.copyHeap()
|
||||
out.munmap()
|
||||
return nil
|
||||
}
|
||||
if out.f == nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue