• 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: detecting logout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting logout


  • Subject: Re: detecting logout
  • From: Pete Gontier <email@hidden>
  • Date: Tue, 01 Feb 2005 14:04:09 -0800

By the way, the triple-posting of my original message didn't come from me.
According to the headers of the duplicates, someone else re-sent my message
twice. I guess we'll see if it happens again for this message. :-)

circa 2/1/05 12:16 PM, "Graham J Lee" <email@hidden>
wrote:

> Does the user's .logout script (or whatever alternative bash has) get
> run when they log out of the console environment?  If so, you launch
> your daemon from .login, and cause it to write its pid into
> ~/.mydaemonname.pid, and then .logout contains the line "kill -QUIT
> `cat ~/.mydaemonname.pid`".

If this script does run, and I doubt it does since typically such things are
only run as part of a terminal session, I can't really exploit this
reasonably because such scripts are arbitrarily complex and thus very
difficult to reliably modify programmatically (especially on uninstall), and
our users have no command-line expertise so can't do it themselves.

> Of course, if it doesn't get run, then you probably need to use a
> logouthook.  But that would make you a customer of the WindowServer,
> which you don't want (understandably, because then users who ssh in
> don't get to kill their daemons).

I got an additional message off-list containing a link to a page on logout
hooks.

    http://developer.apple.com/documentation/
        MacOSX/Conceptual/BPSystemStartup/Tasks/CustomLogin.html

I read this far and stopped:

    you must modify the code for launching loginwindow found in /etc/ttys

Wow. I am definitely not in a position to do that.

I suppose I should consider kAEQuitApplication, but I am not sure how I am
going to listen to that without attaching to the window server. I have heard
there are lower-level ways to do Apple events, but I have never used them.

  --

    Pete Gontier
    http://www.m-audio.com/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: detecting logout
      • From: Jerry Pendergraft <email@hidden>
References: 
 >Re: detecting logout (From: Graham J Lee <email@hidden>)

  • Prev by Date: detecting logout
  • Next by Date: Re: detecting logout
  • Previous by thread: Re: detecting logout
  • Next by thread: Re: detecting logout
  • Index(es):
    • Date
    • Thread