-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
NewProcess does not return an error if process does not exist on Windows #729
Comments
This check is only present on Linux currently (checking if |
Trying to call |
I see. Could you then update the documentation to reflect this behavior? The windows version of Ha! Good Catch! Thanks for that. |
Documentation is only present on linux because it's godoc.org default GOOS (last time I checked there was no way to change GOOS via URL parameter on godoc.org) and because we have the same documentation for all the platforms. You can check for process existence with
This will be fixed with #713 being merged and the test for process existence being added to |
I know - that is why i checked the source code. I am really annoyed by this behavior of godoc.org.
Perfect. Wasn't aware of that timeline. |
[process] Fix #729 check process existence in NewProcess()
Describe the bug
The docs for
NewProcess
state thatAn error will be returned if the process does not exist.
Running on Windows 10,
NewProcess
does not return an error if called with an invalid PID.(Works fine on Linux 4.9)
To Reproduce
Expected behavior
NewProcess
should return an error.Environment (please complete the following information):
Microsoft Windows [Version 10.0.17763.615]
Linux 74b9ced6499d 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]Additional context
Library version:
Cross-compiling for Windows on Linux using
GOOS=windows go build
in a dir with only the file pasted above.Workaround
The text was updated successfully, but these errors were encountered: