Change in osmo-dev[master]: net: run.sh: tweak quit logic
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-dev/+/27037 ) Change subject: net: run.sh: tweak quit logic ...................................................................... net: run.sh: tweak quit logic In some cases, the shell doesn't wait for the read to complete and just keeps on printing "q Enter to close" in an infinite loop, making it impossible to read the logs above. This happens with all terminals. I'm not sure about the exact cause, work around it by only printing the message once and sleeping inside the while true loop. Change-Id: Iebb799493f76fd57f24b15c998ded2bd8e284e6b --- M net/templates/run.sh 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-dev refs/changes/37/27037/1 diff --git a/net/templates/run.sh b/net/templates/run.sh index a611926..3690b39 100755 --- a/net/templates/run.sh +++ b/net/templates/run.sh @@ -120,12 +120,14 @@ echo +echo '---' +echo 'q Enter / ^C to close' while true; do - echo 'q Enter to close' read q_to_close if [ "x\$q_to_close" = xq ]; then break fi + sleep 0.1 done EOF chmod +x "$wrapper" -- To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27037 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-dev Gerrit-Branch: master Gerrit-Change-Id: Iebb799493f76fd57f24b15c998ded2bd8e284e6b Gerrit-Change-Number: 27037 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
osmith