Re: Detect the login window is being displayed
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