# /usr/local/bin/gdb --version | head -1 GNU gdb (GDB) 7.11.1 [GDB v7.11.1 for FreeBSD] # # /usr/local/bin/gdb -batch -ex run --args sleep 2 < /dev/null quit A debugging session is active. Inferior 1 [process 17087] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] -- e.g. hangs above. pkill -9 gdb stops it. without < /dev/null (or running same on linux) yields: # /usr/local/bin/gdb -batch -ex run --args sleep 2 [Inferior 1 (process 17093) exited normally] #
Hi Tomi, thanks to reporting. I can reproduce the problem. I've repeated the test using the upcoming gdb 7.12 and it seems fixed. I'm filling a PR and soon it will be available as package.