• 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: Detecting that a process has ended?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting that a process has ended?


  • Subject: Re: Detecting that a process has ended?
  • From: Rick Mann <email@hidden>
  • Date: Sat, 27 Jun 2009 02:29:18 -0700


On Jun 27, 2009, at 02:27:14, Chris Suter wrote:

Hi Rick,

On Sat, Jun 27, 2009 at 7:22 PM, Ken Thomases<email@hidden> wrote:
On Jun 27, 2009, at 4:11 AM, Rick Mann wrote:

I'm starting a process via NSTask and launchctl. I can use launchctl list
to get the process' PID. Is there a way i can get notified if the process
exits (or dies) without polling launchctl list?

http://developer.apple.com/technotes/tn/tn2050.html

I'm not sure that will be much help to you for what you're doing. If it's not a GUI task, those methods won't work I don't think.

Do you have control over the service that you're launching? Is it your
own code? If so, there are other IPC mechanisms you could use.

I think it'll work very well. It's not a GUI process (although most of the techniques in the TN support only processes in the current context). In this case, the kqueues will do just fine.


--
Rick

_______________________________________________

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: Detecting that a process has ended?
      • From: Chris Suter <email@hidden>
References: 
 >Detecting that a process has ended? (From: Rick Mann <email@hidden>)
 >Re: Detecting that a process has ended? (From: Ken Thomases <email@hidden>)
 >Re: Detecting that a process has ended? (From: Chris Suter <email@hidden>)

  • Prev by Date: Re: Detecting that a process has ended?
  • Next by Date: Re: GC pros and cons
  • Previous by thread: Re: Detecting that a process has ended?
  • Next by thread: Re: Detecting that a process has ended?
  • Index(es):
    • Date
    • Thread