Is it possible to distinquish if a "quit" event is being sent to an application becuase of requested logout vs. a full restart or shutdown has been requested.
I have a faceless application that monitors the status of multiple, background, processes.
When the app receives a "quit" event, how it handles those running processes and how I would like to prompt the user should be different if (a) the app is just quiting, but the user is not logging out, (b) the user is logging out but the system isn't shutting down, or (c) the system is shutting down.
I see that one can observe NSWorkspaceWillPowerOffNotification, but there doesn't seem to be any distinction between "just logout" and "logout and shutdown".