tags:

views:

28

answers:

1

I'm creating a daemon that will be installed in the LaunchAgents folder. Some questions about making it sleep:

  1. Because it's a LaunchAgent item will the executable automatically sleep when the user/system sleeps?
  2. If the answer is yes to question 1, do I need to specify anything in the plist document?
  3. If the answer is no to question 1, what is the best approach to deal with this problem?

Basically my app needs to sleep when the computer sleeps. What is the best way to make this happen in C or Cocoa?

Thanks!

A: 

You may find good answers on this question:
What happens to my app when my Mac goes to sleep?

Basically, the execution of your app will be freezed when the computer goes into sleep mode. It's automatically resumed when the computer wakes-up...

Macmade