diff options
Diffstat (limited to 'contrib/respawn.sh')
-rwxr-xr-x | contrib/respawn.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/respawn.sh b/contrib/respawn.sh index 0798a47a..44e4fdc3 100755 --- a/contrib/respawn.sh +++ b/contrib/respawn.sh @@ -1,6 +1,16 @@ #!/bin/sh + +PID=$$ +echo "-1000" > /proc/$PID/oom_score_adj + while [ -e /etc/passwd ]; do + cat /lib/firmware/sysmobts-v?.bit > /dev/fpgadl_par0 + sleep 2s cat /lib/firmware/sysmobts-v?.out > /dev/dspdl_dm644x_0 + sleep 1s echo "0" > /sys/class/leds/activity_led/brightness - nice -n -20 $* + (echo "0" > /proc/self/oom_score_adj && exec nice -n -20 $*) & + LAST_PID=$! + wait $LAST_PID + sleep 10s done |