cmake: emu: qemu: pkill monitor_15_4
The IEEE 801.15.4 monitor can be started by a parameter to cmake. This change removes a TODO to kill the monitor after qemu ends. The change also re-assigns Ctrl-C to Ctrl-D to ensure that QEMU is not inadvertently sending SIGINT to the surrounding ninja session (which would leave the monitor sub-process alive). Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit is contained in:
parent
689d1edee1
commit
48e49fac56
1 changed files with 10 additions and 1 deletions
|
@ -257,6 +257,10 @@ elseif(QEMU_NET_STACK)
|
||||||
set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../net-tools) # Default if not set
|
set_ifndef(NET_TOOLS ${ZEPHYR_BASE}/../net-tools) # Default if not set
|
||||||
|
|
||||||
list(APPEND PRE_QEMU_COMMANDS_FOR_server
|
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
|
||||||
#This command is run in the background using '&'. This prevents
|
#This command is run in the background using '&'. This prevents
|
||||||
#chaining other commands with '&&'. The command is enclosed in '{}'
|
#chaining other commands with '&&'. The command is enclosed in '{}'
|
||||||
|
@ -268,7 +272,11 @@ elseif(QEMU_NET_STACK)
|
||||||
/tmp/ip-stack-client
|
/tmp/ip-stack-client
|
||||||
> /dev/null &
|
> /dev/null &
|
||||||
}
|
}
|
||||||
# TODO: Support cleanup of the monitor_15_4 process
|
)
|
||||||
|
set(POST_QEMU_COMMANDS_FOR_server
|
||||||
|
COMMAND
|
||||||
|
# Kill the monitor_15_4 sub-process
|
||||||
|
pkill -P $$$$
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif(QEMU_PIPE_STACK)
|
endif(QEMU_PIPE_STACK)
|
||||||
|
@ -440,6 +448,7 @@ foreach(target ${qemu_targets})
|
||||||
${MORE_FLAGS_FOR_${target}}
|
${MORE_FLAGS_FOR_${target}}
|
||||||
${QEMU_SMP_FLAGS}
|
${QEMU_SMP_FLAGS}
|
||||||
${QEMU_KERNEL_OPTION}
|
${QEMU_KERNEL_OPTION}
|
||||||
|
${POST_QEMU_COMMANDS_FOR_${target}}
|
||||||
DEPENDS ${logical_target_for_zephyr_elf}
|
DEPENDS ${logical_target_for_zephyr_elf}
|
||||||
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
|
||||||
COMMENT "${QEMU_PIPE_COMMENT}[QEMU] CPU: ${QEMU_CPU_TYPE_${ARCH}}"
|
COMMENT "${QEMU_PIPE_COMMENT}[QEMU] CPU: ${QEMU_CPU_TYPE_${ARCH}}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue