[launchd-dev] launchd and system sleep

Damien Sorresso dsorresso at apple.com
Mon Jun 1 14:17:00 PDT 2009


On Jun 1, 2009, at 1:55 PM, Thomas Clement wrote:
> Hello,
>
> The manual page for the "StartInterval" key mentions that "if the  
> system is asleep, the job will be started the next time the computer  
> wakes up".
> However I'm receiving bug reports from users which seem to indicate  
> this is not always the case (the job is not launched for a long  
> period of time).
> The problem does not seem to occur with the "StartCalendarInterval"  
> key.

There is a bug in the kernel which prevents timers from coalescing  
after a wake from sleep (rdar://problem/4058640). launchd worked  
around it for Leopard, but the workaround was only applied to  
StartCalendarInterval, not StartInterval, apparently.

> I've also noticed the "com.apple.backupd-wake.plist" Time Machine  
> job which is apparently triggered at wake time although it  
> advertises no way to be launched. Why the need for this additional  
> job since "com.apple.backupd-auto.plist" uses the "StartInterval"  
> key? Is it a workaround for a launchd issue?

That job is for when you turn on Time Machine backups from System  
Preferences.

> Is this a known issue or am I missing something?
> Can something be done about this?

If it's feasible for you to switch to StartCalendarInterval, that  
could be a temporary solution.
-- 
Damien Sorresso
BSD Engineering
Apple Inc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2425 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20090601/864be663/attachment.bin>


More information about the launchd-dev mailing list