• 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: applicationShouldTerminate delegate does not work in Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applicationShouldTerminate delegate does not work in Leopard


  • Subject: Re: applicationShouldTerminate delegate does not work in Leopard
  • From: Jens Miltner <email@hidden>
  • Date: Thu, 17 Jan 2008 13:45:07 +0100


On 17.01.2008, at 12:54, Jean-Daniel Dupas wrote:


I'have just try with a background cocoa application on Leopard, and the Activity Moniter call SIGINT. But you cannot do anything in a signal handler, so it will not be helpfull.


static void sigtest(int arg) {
 printf("%s\n", __func__);
}

signal(SIGINT, sigtest);

Well, you _can_ do some things in a signal handler (otherwise they would be uterless unuseful ;-).
You could, e.g. set a flag or signal a semaphore - that's all within the allowed APIs, IIRC.


You can't call any Cocoa functions directly, but you could have e.g. a background thread block on a semaphore or mutex and signal/unlock from the signal handler, then the background thread could perform a selector on the main thread, etc.
Quite a bit jumping through hoops, but then again, if it's the only option...


However, the OP meanwhile mentioned that no signals seem to be send to the process, which seems a bit strange, as in my experience an app is either send an appleevent or signalled...

</jum>
_______________________________________________

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


  • Follow-Ups:
    • Re: applicationShouldTerminate delegate does not work in Leopard
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >applicationShouldTerminate delegate does not work in Leopard (From: "parag vibhute" <email@hidden>)
 >Re: applicationShouldTerminate delegate does not work in Leopard (From: "Clint Shryock" <email@hidden>)
 >Re: applicationShouldTerminate delegate does not work in Leopard (From: "parag vibhute" <email@hidden>)
 >Re: applicationShouldTerminate delegate does not work in Leopard (From: Jens Miltner <email@hidden>)
 >Re: applicationShouldTerminate delegate does not work in Leopard (From: "parag vibhute" <email@hidden>)
 >Re: applicationShouldTerminate delegate does not work in Leopard (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Can I use the CoreData AppDelegate for AppleScript enabling my Cocoa application
  • Next by Date: Re: applicationShouldTerminate delegate does not work in Leopard
  • Previous by thread: Re: applicationShouldTerminate delegate does not work in Leopard
  • Next by thread: Re: applicationShouldTerminate delegate does not work in Leopard
  • Index(es):
    • Date
    • Thread