Open HouzuoGuo opened 4 years ago
The documentation is actually correct on Windows.
Maybe on UNIX systems Release
should send the pid to a reaper, before setting Process.Pid to -1.
The alternative is to document that Release
behavior is different between UNIX systems and Windows.
@HouzuoGuo , @perillo I've sent the PR that specifying Release
's NOOP behavior on Unix. Feel free to recommend me better docstring. :)
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes indeed.
What operating system and processor architecture are you using (
go env
)?linux on amd64
What did you do?
Run the code below:
What did you expect to see?
The documentation of Process.Release states:
It leaves a false impression that caller should invoke
Release()
if the caller does not intend to consume the process exit status - "... only needs to be called if Wait is not", even though doing so leaves a zombie process on the system.Please clarify that
Release()
is not intended to replaceWait()
at all in the function's description.