You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With 1.22 this works without issue. As of https://go.dev/cl/570036, this prints error: bad file descriptor.
The problem is that 0 is a valid value of os.Process.handle, so the Signal method tries to use it as a pidfd.
This is easy to fix with an additional field to report whether handle is initialized (N.B. that handle could really be FD 0, so we can't just look for 0). I will send a CL.
(As far as I know, this form of using os.Process has never worked on Windows, as it always uses the handle field.)
With 1.22 this works without issue. As of https://go.dev/cl/570036, this prints
error: bad file descriptor
.The problem is that 0 is a valid value of
os.Process.handle
, so theSignal
method tries to use it as a pidfd.This is easy to fix with an additional field to report whether
handle
is initialized (N.B. thathandle
could really be FD 0, so we can't just look for 0). I will send a CL.(As far as I know, this form of using
os.Process
has never worked on Windows, as it always uses thehandle
field.)cc @kolyshkin
The text was updated successfully, but these errors were encountered: