• 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: NSTask terminates when NSApplication exits
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask terminates when NSApplication exits


  • Subject: Re: NSTask terminates when NSApplication exits
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 19 Jan 2012 13:08:45 -0600

On Jan 19, 2012, at 12:49 PM, Jens Alfke wrote:

> On Jan 19, 2012, at 10:10 AM, Scott Ribe wrote:
>
>> Not true. It looks like the case at a cursory level because session management does this when you're in the terminal. There are various ways to arrange for a process to exit when its parent exits. But it is *not* the case that a process is automatically killed when its parent exits.
>
> Huh; you learn something new every day!
>
> In addition to shell behavior you mention, I also see this when Xcode crashes and takes down the app I’m debugging. But I suppose Xcode configures the process it launches to work that way?

This is probably because Xcode is using a pseudo-terminal device as the subprocess's output, so it can capture it and show it in the console window, and thus the subprocess has a controlling terminal, which is closed when Xcode crashes, which delivers SIGHUP to the subprocess.  If a process hasn't specifically arranged otherwise, it will be killed by the SIGHUP.

Regards,
Ken

_______________________________________________

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: 
 >NSTask terminates when NSApplication exits (From: Andrew <email@hidden>)
 >Re: NSTask terminates when NSApplication exits (From: Jens Alfke <email@hidden>)
 >Re: NSTask terminates when NSApplication exits (From: Scott Ribe <email@hidden>)
 >Re: NSTask terminates when NSApplication exits (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: NSTask terminates when NSApplication exits
  • Next by Date: Embedded Library in Cocoa App
  • Previous by thread: Re: NSTask terminates when NSApplication exits
  • Next by thread: Re: NSTask terminates when NSApplication exits
  • Index(es):
    • Date
    • Thread