Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: emu: qemu: return to ctrl-c #79132

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions cmake/emu/qemu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -257,26 +257,27 @@ elseif(QEMU_NET_STACK)
set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../tools/net-tools) # Default if not set

list(APPEND PRE_QEMU_COMMANDS_FOR_server
COMMAND
#Disable Ctrl-C to ensure that users won't accidentally exit
#w/o killing the monitor.
stty intr ^d
COMMAND
COMMAND stty intr ^d

#This command is run in the background using '&'. This prevents
#chaining other commands with '&&'. The command is enclosed in '{}'
#to fix this.
{
${NET_TOOLS}/monitor_15_4
${PCAP}
/tmp/ip-stack-server
/tmp/ip-stack-client
> /dev/null &
COMMAND {
${NET_TOOLS}/monitor_15_4
${PCAP}
/tmp/ip-stack-server
/tmp/ip-stack-client
> /dev/null &
}
)
set(POST_QEMU_COMMANDS_FOR_server
COMMAND
# Re-enable Ctrl-C.
COMMAND stty intr ^c

# Kill the monitor_15_4 sub-process
pkill -P $$$$
COMMAND pkill -P $$$$
)
endif()
endif(QEMU_PIPE_STACK)
Expand Down
Loading