Marko Kiiskila created MYNEWT-15:
------------------------------------
Summary: newt target debug, Ctrl+C getting delivered to openocd on
OS X 10.9
Key: MYNEWT-15
URL: https://issues.apache.org/jira/browse/MYNEWT-15
Project: Mynewt
Issue Type: Bug
Environment: OSX 10.9
Reporter: Marko Kiiskila
Cannot stop target when gdb is invoked with 'newt target debug'
gdb executes shell command starting openocd in the background.
Looks like openocd is still in the same process group, therefore Ctrl+C
ends up killing it.
With OS X 10.10 this works; sh and openocd end up in a separate process group.
Note that the `trap "" 2` that shell gets does not block it either.
Pauls-MacBook-Pro-2:olimex_stm32-e407_devboard paulfdietrich$ ps -o
pid,ppid,pgid,command
PID PPID PGID COMMAND
56493 56492 56493 -bash
57180 56493 57180 sleep 60
59631 59630 59631 -bash
60972 59631 60972 go run
/Users/paulfdietrich/Development/Go/src/git-wip-us.apache.org/repos/asf/incubator-mynewt-newt.git/newt/newt.go
target debug blinky
60978 60972 60972
/var/folders/x0/1yjkfd_93j79r64d2vf104d40000gp/T/go-build348117481/command-line-arguments/_obj/exe/newt
target debug blinky
60979 60978 60972 /bin/sh
/Users/paulfdietrich/Development/runtime/incubator-mynewt-larva/hw/bsp/olimex_stm32-e407_devboard/olimex_stm32-e407_devboard_debug.sh
/Users/paulfdietrich/Development/runtime/incubator-mynewt-larva/project/blinky/bin/blinky/blinky
60980 60979 60972 arm-none-eabi-gdb -x .gdb_cmds
/Users/paulfdietrich/Development/runtime/incubator-mynewt-larva/project/blinky/bin/blinky/blinky.elf
60982 1 60972 /bin/sh -c trap "" 2; openocd -f
interface/ftdi/olimex-arm-usb-tiny-h.cfg -s hw/bsp/olimex_stm32-e407_devboard
-f f407.cfg -c "gdb_port 3333; telnet_port 4444; stm32f4x.cpu configure -event
gdb-detach {shutdown}" -c init -c "reset halt"
60983 60982 60972 openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -s
hw/bsp/olimex_stm32-e407_devboard -f f407.cfg -c gdb_port 3333; telnet_port
4444; stm32f4x.cpu configure -event gdb-detach {shutdown} -c init -c reset halt
56759 56758 56759 -bash
57622 57621 57622 -bash
58619 58618 58619 -bash
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)