Open elliette opened 6 months ago
However, this set of pids contains the VM pid, which defaults to
-1
if it was not set
I presume this is something mis-reporting it's PID, and not DAP recording a -1 somewhere that wasn't set? We should only record pid
s that are provided to DAP (such as in JSON requests from other tools, or from the a response from the VM Service).
It's not clear which of these payloads contains the offending -1 though (if it's somewhere where the field is optional, I wonder if it could be omitted instead of set to -1?)
On disconnection, DAP kills all pids: https://github.com/dart-lang/sdk/blob/7685ec3e0ea6b28b72823cf687d33118864ebd92/pkg/dds/lib/src/dap/adapters/mixins.dart#L41-L47
However, this set of pids contains the VM pid, which defaults to
-1
if it was not set: https://github.com/dart-lang/sdk/blob/7685ec3e0ea6b28b72823cf687d33118864ebd92/pkg/vm_service/lib/src/vm_service.dart#L8570On Linux, killing
-1
is a special case that means "kill all the process that you can." We had a case where this was killing a bunch of running processes on a users machine.