• 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: Obj-C server and signal handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obj-C server and signal handling


  • Subject: Re: Obj-C server and signal handling
  • From: Uli Kusterer <email@hidden>
  • Date: Thu, 14 Feb 2008 20:54:17 +0100

On 14.02.2008, at 19:48, Matt Mashyna wrote:
I whipped up a little cocoafied server without a UI and it works great, easy to read and all that good stuff but I'm stuck on one last thing. I'm trying to catch a quit signal from Activity Monitor. Force Quit definitely works but I'd like to be able to catch whatever signal the Activity Monitor sends for the polite quit. Doesn't seem to be sending a SIGQUIT, SIGTERM or anything like that. Sometimes I see a SIGINT. I can catch signals sent from the terminal fine. Is this the wrong way to go about this?


For a raw command-line tool, handling the right signal is what you're expected to do (i.e. if you started with a "Foundation Tool" target or similar).

If you actually created a bundled Cocoa application, but just removed all the GUI stuff, you really should be running the NSApp you have and have it take care of quitting. Or you could use Carbon/ CoreFoundation methods to register for the quit Apple Event, which is what the OS seems to send every app in that case.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

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


References: 
 >Obj-C server and signal handling (From: Matt Mashyna <email@hidden>)

  • Prev by Date: Re: In-loop releasing of objects does not free memory?
  • Next by Date: Re: In-loop releasing of objects does not free memory?
  • Previous by thread: Re: Obj-C server and signal handling
  • Next by thread: setting Custom view into menuItem in Tiger
  • Index(es):
    • Date
    • Thread