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
{{ message }}
Repository navigation
killPid returns false when successfully killing on Windows. Make it return true! #47675
The killPid static method of Process tries to send a signal to a process. It returns true if the signal was delivered (whether it was a kill-signal or not).
However, on Windows, it just kills the process in a non-signal based way. It then returns false, probably because no signal was delivered.
It would be better if it returned true if a process with that Pid existed (and it was killed), and false if no process with that Pid existed.
I agree that the source code looks like it does the right thing.
I was reporting this bug based on someone else's experience. Likely something like flutter/flutter#96320 (comment), but I no longer remember how I first became aware of it.
Activity
aam commentedon Jan 13, 2022
@lrhn , looking at the source code https://github.com/dart-lang/sdk/blob/main/runtime/bin/process_win.cc#L922 it seems it should return
trueifTerminateProcesswas successful.falsecan also be returned if we failed to (get permission to) attach to the subject process.Do you have a repro for the problem you describe?
lrhn commentedon Jan 14, 2022
I agree that the source code looks like it does the right thing.
I was reporting this bug based on someone else's experience. Likely something like flutter/flutter#96320 (comment), but I no longer remember how I first became aware of it.
aam commentedon May 15, 2024
Please reopen with reproduction steps.