Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2007

    How to get Restart,Shutdown .... events

    Hi Guys,
    My first query is what are different automation testing tools are available in Mac?

    Second is:

    I have written a network application in cocoa.
    In my application I want to capture the Logout,Restart,Shutdown events.
    Based on these events I want to send some message to my server.

    After reading the documentation on internet regarding system events I came to know that whenever user choose "Shutdown" or "Restart" from the Apple Menu the running application gets "KAEQuitApplication" event but not any specific event whether the application is quiting by "Shutdown" or "Restart" or "Log Out". The "KAEQuitApplication" event also get by the user when he/she quit their application by clicking at the top left cross button of the application window.

    I m looking to get the specific event related with each action taken by the user i.e. "Shutdown" or "Restart" or "Log Out".
    Is it possible to get the different event for each of the action taken by the user i.e. "Shutdown" or "Restart" or "Log Out"?.

    suggest me some imp link or sample code.

    waiting for the reply.


  2. #2
    Member striker0204's Avatar
    Join Date
    Apr 2007
    sorry im not offering advice here, but isnt that invasion of privacy...?

  3. #3
    Senior Member WolfeTone's Avatar
    Join Date
    Jun 2007
    Quote Originally Posted by striker0204
    sorry im not offering advice here, but isnt that invasion of privacy...?

    And sorry, I'm only after installing Mac OS X for the first time over the weekend so not familiar with it.

  4. #4
    Junior Member
    Join Date
    Jul 2007

    Restart ,Shutdonw events

    I don't think capturing the event of shutdown,restart .... is relate with privacy.
    I think Microsoft provide the these events then why not Apple. It may be but I m unable to find out the solution.
    Last edited by sunilp2011; July 16th, 2007 at 10:20 AM.

  5. #5
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    United Kingdom: Bridlington

    I do not think that there is a privacy issue here, other than from a security angle.

    If a user Logs Out, then the session should be closed and any cookies erased. It is a conscious request that must be responded to accordingly.

    Restart or Shutdown are the same.......... and identical to system crashes, power outs. The user merely terminates the connection. This may be willing or unwilling, you have no way of telling as that is "client side".

    You now have just two possible scenarios:

    1. The user requests closure
    2. The contact is terminated for "some reason"

    In the first instance the response is simple. In the second scenario the response will depend upon user requirements. I would suspect that something like a session validation check every "x" minutes, then close the session if there is no response from the client.

    The simplest and safest approach is to close the session on loss of contact. All you need to log is if it was requested or just happened. That way you minimise the risk of session hijacking.

    From the client side you should be able to determine the "abrupt" terminations, but not an orderly shutdown request, as this is not an "event", it is someone using an application within its normal parameters.

    You should be able to detect a requested shutdown

    1. Shut Down Machine or Restart ( no significant difference as shutdown happens in both cases)
    2. User Logout/Change (should close open applications)
    3. Close Application

    You then assume that anything that does not do that is a systems crash of some sort, or a power down. You have no choice there, as neither the application nor the OS will have the opportunity to report the plug being pulled.

    Items #1 ~ #3 above would be kicked off by "system" at the request of "user"........... assuming that "user" has the proper authorities.

  6. #6
    Junior Member
    Join Date
    Jul 2007

    event capturing

    is not possible to capture the Restart,Shutdown,Log Out events in Macintosh?

    Then How can I get the notification that user session is ending whenever the user Restart ,Shutdown or Log Out the machine?

    waiting for the positive response.

Similar Threads

  1. AO mirc events
    By spamdies in forum Site Feedback/Questions/Suggestions
    Replies: 4
    Last Post: July 27th, 2006, 12:33 PM
  2. Catching mouse events
    By Barov4e in forum Programming Security
    Replies: 5
    Last Post: November 22nd, 2005, 07:29 AM
  3. How often do you view your Event Viewer?
    By !mitationRust in forum Microsoft Security Discussions
    Replies: 35
    Last Post: November 10th, 2005, 11:20 AM
  4. Unsual Events
    By Palemoon in forum AntiOnline's General Chit Chat
    Replies: 0
    Last Post: August 14th, 2003, 04:42 AM
  5. Process Events from Snort
    By t2k2 in forum IDS & Scanner Discussions
    Replies: 2
    Last Post: May 26th, 2003, 11:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.