pndnotifyd: fix some crashes
[pandora-libraries.git] / testdata / scripts / pnd_run.sh
index 2244ef3..0ea23e8 100755 (executable)
@@ -101,13 +101,9 @@ PND_WaitFor() {
 }
 
 PND_WaitForExit() {
-       local l_sleep=1
-       PID=$(pidof -o %PPID -x "$1")   # get pid of app
-       while [ -n "$PID" ]; do
-               sleep $l_sleep
-               test $l_sleep -lt 10 && l_sleep=$(($l_sleep + 1))
-               PID=$(pidof -o %PPID -x "$1")
-       done
+       # this used to wait for $1 ($EXENAME), but that doesn't work well
+       # when multiple PNDs run as too many PNDs have run.sh as $EXENAME
+       wait
 }
 
 PND_Exec() {