-
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: ErrProcessDone not defined on windows #42311
Comments
I´ve just found that |
I see that in Is the solution to this issue as simple as exporting the variable |
Change https://golang.org/cl/266997 mentions this issue: |
Marking as release-blocker because this is a defect in a new API being added in Go 1.16 (#39444). |
Add GenerateConsoleCtrlEvent call to internal syscall package. Define ErrProcessDone while reviewing handling of os.Signal(). Update test to run for windows using the added call. Fixes #42311 Fixes #46354 Change-Id: I460955efc76c4febe04b612ac9a0670e62ba5ff3 Reviewed-on: https://go-review.googlesource.com/c/go/+/367495 Trust: Patrik Nyblom <pnyb@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
It reproduces on tip
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use the error
os.ErrProcessDone
with GOOS=windows, which has just been exported in tip CL 242998.Playground link: https://play.golang.org/p/OMXQb0DeySn
What did you expect to see?
Code compiling and
p.Signal()
returningos.ErrProcessDone
What did you see instead?
.\main.go:23:13: undefined: os.ErrProcessDone
It seems that
os.ErrProcessDone
has only been exported for Unix, even though this same error can also be returned on Windows (see os/exec_windows.go#L64).It was probably forgotten in CL 242998 because the error was declared as a sentinel error on Unix and inlined on Windows.
The text was updated successfully, but these errors were encountered: