Trying to kill a discovery process on Windows might fail with a TerminateProcess access is denied
#1587
Labels
conclusion: invalid
Issue/PR not valid
os: windows
Specific to Windows operating system
topic: code
Related to content of the project itself
topic: gRPC
Related to the gRPC interface
type: imperfection
Perceived defect in any part of project
Bug Report
Current behavior
I only verified this behaviour when running the
arduino-cli
indaemon
mode.It probably happens also when running a CLI command but it should not affect the end user in that case since the discovery processes would quit in any case.
This line returns an
error
so the CLI doesn't consider the discovery process to be closed.This prevents the
quit
message to be sent to any client listening for boards connection and disconnection event, so these client won't know they must restart the board list watch process and listen from a new communication channel, thus the clients won't see any more events.The
quit
message has been added with #1460.Expected behavior
I expect the discovery process to be killed only if it's still running.
Environment
arduino-cli version
):0.20.2
Additional context
My guess is that it's failing because the process we're trying to kill already has quit, we should probably only kill it if it's still running.
The text was updated successfully, but these errors were encountered: