-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os: data race on os.Process.done #3969
Labels
Comments
http://golang.org/cl/6462081 is a possible fix which uses channels. pkg/os already imports sync/atomic so an atomic bool solution is an alternative. |
I think an atomic variable is a more appropriate solution here. An atomic flag is what the code inherently needs, trying to mimic it with chan, close and select looks a bit awkward to me. Note that the race will be there in any case (Kill may kill another process), we are just trying to make it MM-conformant. |
Thanks for the feedback, I've updated http://golang.org/cl/6462081 to use sync/atomic. |
6462081 looks good. I will submit once the builders are looking happier. Owner changed to @davecheney. Status changed to Started. |
This issue was closed by revision 122a558. Status changed to Fixed. |
davecheney
added a commit
that referenced
this issue
May 11, 2015
««« backport 4fc1c61c3c2c os: fix data race on Process.done Fixes #3969. R=dvyukov, r, alex.brainman, minux.ma CC=golang-dev https://golang.org/cl/6462081 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: