rtcwake: give its wakelock a uniq id
The worry here is that if we have multiple cron jobs running at the same time, the first one to exit will remove the lock. (I could be wrong on this.) Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
This commit is contained in:

committed by
Willow Barraco

parent
6213d1dacd
commit
611d4b2f44
@@ -8,11 +8,11 @@
|
||||
. sxmo_common.sh
|
||||
|
||||
# We can have multiple cronjobs at the same time
|
||||
sxmo_wakelock.sh lock executing_cronjob infinite
|
||||
sxmo_wakelock.sh lock executing_cronjob_$$ infinite
|
||||
sxmo_wakelock.sh unlock waiting_cronjob
|
||||
|
||||
finish() {
|
||||
sxmo_wakelock.sh unlock executing_cronjob
|
||||
sxmo_wakelock.sh unlock executing_cronjob_$$
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user