golang/go

os: document the Process.Pid field

Geschlossen

#36.726 geöffnet am 24.01.2020

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (19.008 Forks)batch import
DocumentationNeedsFixhelp wanted

Repository-Metriken

Stars
 (133.883 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide