• 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
Terminating subtasks reliably
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Terminating subtasks reliably


  • Subject: Terminating subtasks reliably
  • From: "McLaughlin, Michael P." <email@hidden>
  • Date: Tue, 30 Mar 2010 16:01:51 -0400
  • Acceptlanguage: en-US
  • Thread-topic: Terminating subtasks reliably

I have a Cocoa app (Leopard) which launches several Foundation Tool subtasks
(since threads are not sufficient in this case).  Currently, I terminate
these subtasks via the app-delegate method

-(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication
*)sender

This works provided one Quits the main app using the Quit menu item.
However, if I force-quit or if I abort using the Stop icon in Xcode, then
the main app terminates without terminating the subtasks.

Is there a more reliable hook (e.g., delegate method) that would always get
called even on force-quit or Stop from Xcode so that these subtasks would
always get terminated?  [Otherwise, I have to terminate them from Activity
Monitor.]

Thanks.

--
Mike McLaughlin

_______________________________________________

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: Terminating subtasks reliably
      • From: "A.M." <email@hidden>
    • Re: Terminating subtasks reliably
      • From: Greg Parker <email@hidden>
    • Re: Terminating subtasks reliably
      • From: Jeff Johnson <email@hidden>
  • Prev by Date: Re: NSIsNilTransformerName exception
  • Next by Date: Re: Terminating subtasks reliably
  • Previous by thread: Predicate format to match array of partial strings against other array
  • Next by thread: Re: Terminating subtasks reliably
  • Index(es):
    • Date
    • Thread