@@ -34,12 +34,18 @@ dbus-update-activation-environment --systemd MIR_SOCKET=$MIR_SERVER_FILE
34# systemd when we are done starting up.
34# systemd when we are done starting up.
35export UNITY_MIR_EMITS_SIGSTOP=1
35export UNITY_MIR_EMITS_SIGSTOP=1
37+${BINARY:-unity8} --mode=$MODE "$@" &
41+while [ $count -lt 2000 ]; do # 20 seconds
43+ if [ $(ps --no-headers -o state $child) = "T" ]; then
37−trap 'exit 0' USR1
45+ exit 0
47+ count=`expr $count + 1`
39−(trap 'kill -CONT $$; kill -USR1 $(jobs -p)' STOP;
40− exec ${BINARY:-unity8} --mode=$MODE "$@") &
42−#FIXME -- we keep hitting this timeout
43−sleep 30 # timeout for u8 startup (change to 'infinity' to disable timeout)
44echo "Aborting unity8 launch: didn't hear back from Mir"
50echo "Aborting unity8 launch: didn't hear back from Mir"