Skip to content

Conversation

@cfriedt
Copy link
Member

@cfriedt cfriedt commented Nov 13, 2024

Netcat (nc) does not handle SIGINT. It silently ignores it. This is problematic, because several orphaned processes can be left behind, preventing subsequent invocations of twister or west from succeeding, until orphaned processes are manually killed.

We cannot use run_client(), given that the pydoc for run_client() specifically contains "Run a client that handles SIGINT".

Instead, use check_call(), which correctly handles Ctrl+C.

Fixes #81194

@cfriedt cfriedt force-pushed the west-commands-core-run-telnet-client-ignores-ctrl-c branch from b6a640b to f2ca049 Compare November 14, 2024 13:45
Netcat (nc) does not handle SIGINT. It silently ignores it.

We cannot use run_client(), given that the pydoc for
run_client() specifically contains "Run a client that
handles SIGINT".

Instead, use check_call(), which correctly handles Ctrl+C.

Signed-off-by: Chris Friedt <[email protected]>
@cfriedt cfriedt force-pushed the west-commands-core-run-telnet-client-ignores-ctrl-c branch from f2ca049 to 4fa55fb Compare November 14, 2024 15:38
@cfriedt cfriedt marked this pull request as ready for review November 14, 2024 19:12
@zephyrbot zephyrbot added the area: West West utility label Nov 14, 2024
@de-nordic de-nordic added this to the v4.1.0 milestone Nov 18, 2024
@de-nordic de-nordic added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Nov 18, 2024
@nashif nashif merged commit 8ac483f into zephyrproject-rtos:main Nov 18, 2024
41 checks passed
@cfriedt cfriedt deleted the west-commands-core-run-telnet-client-ignores-ctrl-c branch November 18, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: West West utility Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

west_commands: core: run_telnet_client() ignores Ctrl+C

7 participants