radekp/qtmoko — comment on commit 37e6f3f28fdac33d0b1436aeae49018a0a1cfb68
File: devices/neo/src/devtools/scripts/autorotation-off.sh line 5
By zrafa:

On Fri, Oct 14, 2011 at 04:04:10AM -0700, Guilhem Bonnefille wrote:
> Strange: why a "sleep 5" at begining and no sleep between "kill -15" and "kill -9"?

Ah, that sleep 5 is to give time to the autorotation.perl script to quit.
The idea was:
- We echo 0 > /tmp/autorotation_running.dontdelete, then
- the perl sript, which wakes up after 3 seconds sleeping, checks
that value, if it is 0, it quits.
- If for some reason the perl script is frozen and does not quit alone
the autorotation-off.sh sends the kill and the kill -9 (after waiting
5 seconds, so it knows that perl script did not quit alone).

If you have some suggestions to do it better please tell us.