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

Thanks for the reply.

2011/10/14 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.

I'm just surprised that script does not offer delay between kill and
"kill -9". But I did not know that first line was also a request for
termination.

Eventually, these explanation in comments in the script...

Thanks for all.
--
Guilhem BONNEFILLE
-=- JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/