diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-15 23:27:55 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-03-15 23:27:55 +0100 |
commit | a7c614b3ddb230566cecfea29351cb20449fa323 (patch) | |
tree | e0b0c99e1c957d6cb91762467571ee48cf099cdd /recipes-openmoko/openmoko-gsmd/files | |
parent | 3e7dbdcdba6431d57c24864c3fb96882a3383e52 (diff) |
gsmd: This appears to be a race-free oom adjustment
Use the "() &" syntax to adjust the score before executing the new
command. This is removing the reace from the previous commit. Update
the PR to force rebuilding new packages.
Diffstat (limited to 'recipes-openmoko/openmoko-gsmd/files')
-rw-r--r-- | recipes-openmoko/openmoko-gsmd/files/gsmd-respawn.sh | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/recipes-openmoko/openmoko-gsmd/files/gsmd-respawn.sh b/recipes-openmoko/openmoko-gsmd/files/gsmd-respawn.sh index 99435ed..df40ac0 100644 --- a/recipes-openmoko/openmoko-gsmd/files/gsmd-respawn.sh +++ b/recipes-openmoko/openmoko-gsmd/files/gsmd-respawn.sh @@ -11,9 +11,8 @@ trap "{ rm -f $PIDFILE ; kill 0; }" EXIT while true; do echo "Restarting not dealing well with spaces.." - exec $* & + (echo "0" > /proc/self/oom_score_adj && exec $*) & LAST_PID=$! - echo "0" > /proc/$LAST_PID/oom_score_adj wait $LAST_PID sleep 10s done |