Description
Describe the request
From @kittaakos comment
Besides the application-level error handling for the services, I would like to get a proper exit code and a terminating daemon process when something went wrong. Now, IDE2 must sniff into the stderr of the process, parse such messages and kill the daemon process because it's not terminating, although the daemon is nonfunctional:
To determine a
Failed to listen on TCP port. Address already in use.
error message:
failed to listen
,address already in use
,bind
,only one usage of each socket address
For invalid address:
Failed to listen on TCP port. Unknown address.
:
is unknown name
ortcp/
andis an invalid port
To provide the
Failed to listen on TCP port. Invalid port.
to the user:
is an invalid port
andfailed to serve
Describe the current behavior
Arduino CLI daemon will fail with no specific exit code.
Arduino CLI version
nightly
Operating system
N/A
Operating system version
N/A
Additional context
No response
Issue checklist
- I searched for previous requests in the issue trackerI verified the feature was still missing when using the nightly buildMy request contains all necessary details
Activity
cmaglie commentedon Oct 2, 2023
It also seems to fail if an invalid data-dir config is present:
daemon
command errors #2400kittaakos commentedon Nov 3, 2023
#2352 (comment) is not yet resolved via #2400.