[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

anacron apm script



Hello Debian laptop users,

anacron include a script etc/apm/event.d/anacron
that do

case "$1,$2" in
change,power|resume,*)
    /etc/init.d/anacron start >/dev/null
    ;;
esac

This is nice for user of suspend-to-disk machines since this give a
chance to cron jobs to run even if they are schedulled at time when the
machine is suspended (which is the default unless you don't sleep at
night).

Unfortunatly it seems that apm currenlty is unavailable during the
execution of event.d scripts (someone to confirm ?). Since cron jobs
can take a long time this is a problem (and that can cause hang if you
try to suspend before the end of the cron job).

I believe there is a simple solution around that: run anacron in
background like in

case "$1,$2" in
change,power|resume,*)
    setsid /etc/init.d/anacron start >/dev/null
    ;;
esac

It work for me, but can, somebody with an understanding of the problem
comment before I make a bug report ?

Should apmd run every event script in the background to avoid similar
problem ? Should event scripts decide for themself if they need to run
in the background ?

Friendly,
-- 
Bill. <ballombe@debian.org>

Please CC me on reply, thanks!



Reply to: