Closed
Description
As of https://go.dev/cl/570036, FindProcess on a process that doesn't exist returns a Process with Pid == -2, which serves as a sentinel value that Wait and Signal should unconditionally return ErrProcessDone.
However this could break programs that export Pid to equal the value they pass to FindProcess, so I would consider this an incompatible change. That said, I am not aware of real programs broken by this.
My work-in-progress fix for #67634 adds additional internal state to Process for tracking handle validity. It would be easy to track "already done" state there as well, so we may as well fix this incompatibility.
cc @kolyshkin
Metadata
Metadata
Assignees
Type
Projects
Status
Done