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

perillo opened this issue Jan 24, 2020 · 3 comments · May be fixed by #36979

os: document the Process.Pid field #36726

perillo opened this issue Jan 24, 2020 · 3 comments · May be fixed by #36979


Copy link

@perillo perillo commented Jan 24, 2020

As discussed in!topic/golang-nuts/ievQGPz1R7k, 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 this to the Backlog milestone Jan 24, 2020
Copy link

@ianlancetaylor ianlancetaylor commented Jan 24, 2020

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

Copy link

@tiriplicamihai tiriplicamihai commented Feb 2, 2020

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
@tiriplicamihai tiriplicamihai linked a pull request that will close this issue Feb 2, 2020
Copy link

@gopherbot gopherbot commented Feb 2, 2020

Change 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
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants