net: run.sh: fix infinite "q Enter to close" msgs

Fix the logic that is supposed to display a "q Enter to close" message
once and wait for user input, in case one of the Osmocom programs
crashed.

Explicitly read from /dev/tty, as it may not be connected as default
stdin anymore at this point. This happens when using the new code paths
with tmux as terminal, but also happened before recent refactorings for
me with all terminals.

Related: https://media.ccc.de/v/osmodevcall-20211210-osmith-osmo-dev-ttcn3#t=801
Change-Id: Iebb799493f76fd57f24b15c998ded2bd8e284e6b
This commit is contained in:
Oliver Smith 2022-02-21 11:25:37 +01:00
parent cd472bdbf7
commit e33f85f193
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ echo
while true; do
echo 'q Enter to close'
read q_to_close
read q_to_close < /dev/tty
if [ "x\$q_to_close" = xq ]; then
break
fi