• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detect the login window is being displayed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect the login window is being displayed


  • Subject: Re: Detect the login window is being displayed
  • From: Ryan McGann <email@hidden>
  • Date: Wed, 12 Nov 2008 20:48:55 -0800

Originally, I need to distinguish logging out from shutting down or
restarting. Since there isn't an easy way to do that, I am thinking to find
a way to tell only when the user is logging out and let the machine do
whatever it wants when shutting down or restarting.Do you have a better idea
how to do it?
This is going to be hard to distinguish depending on what you mean by "daemon". If you are a true daemon (that runs outside the login context), then you can use SystemConfiguration. You will get a callback when somebody logs in and logs out.

However if you are a Cocoa application (which I assume you are since you posted to cocoa-dev) then this will be difficult to determine. Your application will be quit by loginwindow regardless of whether the user is restarting or logging out, because either way all Cocoa/Carbon applications will be quit. The login/logout notifications will only be posted after your application has already quit.

Please describe what you mean by "daemon" and how your application is being launched.

Ryan
email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Detect the login window is being displayed
      • From: "Maggie Zhang" <email@hidden>
  • Prev by Date: Re: Thread programming
  • Next by Date: Re: NSSplitView can't expand once collapsed
  • Previous by thread: Re: Detect the login window is being displayed
  • Next by thread: Re: Detect the login window is being displayed
  • Index(es):
    • Date
    • Thread