开发者

Have a LaunchAgent sleep when the computer sleeps

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!


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜