Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS startup done event



another workaround would be to simply start immediately but give your backgroundtask a very low priority (nice) so it never gets to run until system load drops to normal.


On 05.11.2009, at 12:35, Anil Kumar K wrote:

> Hi Shantonu
> 
> Sorry for the late response.  Can you please provide sample code on this.  I had seen the header file you suggested but I am confused as to what APIs to call.
> 
> 
> Thanks
> Anil Kumar
> 
> --- On Tue, 27/10/09, Shantonu Sen <email@hidden> wrote:
> 
>> From: Shantonu Sen <email@hidden>
>> Subject: Re: OS startup done event
>> To: "Anil Kumar K" <email@hidden>
>> Cc: "darwin-kernel Kernel" <email@hidden>
>> Date: Tuesday, 27 October, 2009, 7:27 PM
>> "OS Startup" is never really done.
>> That said, <IOKit/pwr_mgt/IOPMLib.h> has some APIs
>> related to system load. You can start up and wait for the
>> load to reach an "OK" level (yes, that's a technical term),
>> or some outer bound timeout like 10 minutes.
>> 
>> Shantonu
>> 
>> Sent from my MacBook
>> 
>> On Oct 27, 2009, at 6:07 AM, Michael Crawford wrote:
>> 
>>> On Tue, Oct 27, 2009 at 4:45 AM, Anil Kumar K <email@hidden>
>> wrote:
>>>> I have a daemon which has to provide some service.
>> I would like to delay providing this service till completion
>> of the OS startup (all OS daemons are up and running) so
>> that it does not affect boot time. Service initialization is
>> a cpu intensive activity. Is there any OS event to know
>> whether the startup is completed or not?
>>> 
>>> Does the login screen have some particular process
>> name?  Perhaps you
>>> could poll for its existence, then sleep a few
>> seconds, and iterate
>>> until it appears.
>>> 
>>> However the user might have selected automatic login -
>> to handle that
>>> one would need to watch for the Finder to appear as
>> well.
>>> 
>>> Mike
>>> -- 
>>> Michael David Crawford
>>> mdcrawford at gmail dot com
>>> 
>>>    GoingWare's Bag of Programming
>> Tricks
>>>       http://www.goingware.com/tips/
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be
>> ignored.
>>> Darwin-kernel mailing list      (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/darwin-kernel/email@hidden
>>> 
>>> This email sent to email@hidden
>> 
>> 
> 
> 
>      Connect more, do more and share more with Yahoo! India Mail. Learn more. http://in.overview.mail.yahoo.com/
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/darwin-kernel/email@hidden
> 
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-kernel/email@hidden

This email sent to email@hidden

References: 
 >Re: OS startup done event (From: Anil Kumar K <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.