Skip to content
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: document the Process.Pid field #36726

Open
perillo opened this issue Jan 24, 2020 · 3 comments
Open

os: document the Process.Pid field #36726

perillo opened this issue Jan 24, 2020 · 3 comments
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Jan 24, 2020

As discussed in https://groups.google.com/forum/#!topic/golang-nuts/ievQGPz1R7k, https://golang.org/cl/4029053 dropped the documentation for the Pid field.

I also propose to extend the documentation with something like:

The value of Pid after the process has been waited/released is not specified.

The reason is that on UNIX systems, Release set Pid to -1, but not on Windows.
This means that a program can not check if Pid == -1 to determine if the process has been released.

The alternative is to change the Windows implementation.

@perillo perillo changed the title os: document the Process.Pid fiels os: document the Process.Pid field Jan 24, 2020
@ianlancetaylor ianlancetaylor added NeedsFix The path to resolution is known, but the work has not been done. help wanted labels Jan 24, 2020
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jan 24, 2020
@ianlancetaylor
Copy link
Contributor

Seems like the first step is to document the Pid field at all.

@tiriplicamihai
Copy link

I can help with this. Will have a PR ready today.

tiriplicamihai added a commit to tiriplicamihai/go that referenced this issue Feb 2, 2020
Explain what Pid field represents and that the value is not specified after waiting/releasing the process.

Fixes golang#36726
@gopherbot
Copy link

Change https://golang.org/cl/217105 mentions this issue: os: document Pid field from Process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants