Re: NSTask flaky about posting terminate notification, in 10.6
Re: NSTask flaky about posting terminate notification, in 10.6
- Subject: Re: NSTask flaky about posting terminate notification, in 10.6
- From: "Adam R. Maxwell" <email@hidden>
- Date: Wed, 02 Sep 2009 17:40:23 -0700
On Sep 2, 2009, at 3:39 PM, Jens Alfke wrote:
On Sep 2, 2009, at 3:25 PM, Dave Keck wrote:
o Recently I've found myself rolling my own solutions to problems
such
as yours, in order to guarantee its level of robustness.
I've been resisting giving up on NSTask, but it might be necessary.
Is your code open-source or otherwise available?
I reimplemented NSTask last year to work around a race condition
(failure to exec under some conditions, possibly only on 10.4). The
code is BSD licensed, and available at
http://code.google.com/p/mactlmgr/source/browse/trunk/BDSKTask.m
I also have a subclass for synchronously reading stdout/stderr, and I
recently had to reimplement -[NSFileHandle
readToEndOfFileInBackgroundAndNotifyForModes] to work around a problem
on 10.6.
http://code.google.com/p/mactlmgr/source/browse/trunk/TLMTask.m
Hope that's useful. Cocotron also has an implementation, but last I
checked it used Foundation in a signal handler and after fork().
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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