commit | 965606b75cdd9c97e21fa75d92a5eed0c3ef6037 | [log] [tgz] |
---|---|---|
author | Erick Tryzelaar <etryzelaar@google.com> | Fri Sep 28 09:18:59 2018 -0700 |
committer | Erick Tryzelaar <etryzelaar@google.com> | Mon Oct 22 13:20:56 2018 -0700 |
tree | d1b86bb391046b9757819b350b8727cd2f12d082 | |
parent | 5fb67a91d53e5f01281904108473ec3ca2b0749e [diff] |
[exec] Fix handle leak in exec.Command There's no guarantee that the exec.Command finalizer will ever be run, so we need to make sure to release the handle if we call Wait or Kill on the process, which is what exec_windows.go does. Also, since exec wraps a uintptr cast of a handle, this uses atomic.SwapUintptr to avoid racing on closing the handle. PKG-250 #comment TEST: Manually verified handle is no longer leaking when calling a command with exec.Command(...).Run(). Change-Id: I4d48f86b1abe725e10f75f2bf46614e7936fb7ba
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.