• 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: How to terminate an NSTask whenever my app terminates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to terminate an NSTask whenever my app terminates?


  • Subject: Re: How to terminate an NSTask whenever my app terminates?
  • From: Bavarious <email@hidden>
  • Date: Tue, 01 Sep 2015 03:44:01 -0300

> On Aug 31, 2015, at 20:32, Jens Alfke <email@hidden> wrote:
>
> (I know this has come up here before, but I can’t get the right combination of search terms to find an answer…)
>
> I’m writing a little GUI wrapper app around a command-line-based server. It uses NSTask to launch the server. I want to ensure that when the app exits, the server process exits too. I can tell the NSTask to terminate in my app delegate's -applicationWillTerminate: method, but that doesn’t handle cases where the app crashes or is force-quit.
>
> IIRC there is a way to tell the kernel to terminate the child process when its parent process exits. But what is it, exactly?

There was a 2010 cocoa-dev thread about this:
http://www.lists.apple.com/archives/cocoa-dev/2010/Aug/msg00512.html

Same thread, single page with all posts:
http://www.cocoabuilder.com/archive/cocoa/291918-how-to-assure-nstask-termination-when-parent-dies.html


_______________________________________________

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: 
 >How to terminate an NSTask whenever my app terminates? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: How to terminate an NSTask whenever my app terminates?
  • Previous by thread: Re: How to terminate an NSTask whenever my app terminates?
  • Next by thread: NSTableView: Rows from bottom up
  • Index(es):
    • Date
    • Thread