Thanks, I'll have a look.

BTW, I was able to confirm it is a result of streams. My Java
processes do not quit if I pipe their output to null:
 NSTask *task = [NSTask new];
 [task setLaunchPath:execPath];
 [task setCurrentDirectoryPath:_directory];
 [task setArguments:arguments];
 [task setStandardError:[NSFileHandle fileHandleWithNullDevice]];
 [task setStandardOutput:[NSFileHandle fileHandleWithNullDevice]];
 [task launch];

So if I want to capture the output I can simply use a file handle to a
real file and it looks like the NSTask process no longer quits.

On Wed, Jan 18, 2012 at 12:55 PM, Scott Ribe
<[email protected]> wrote:
> On Jan 18, 2012, at 11:59 AM, Andrew wrote:
>
>> I can probably find out the answer by trying different things, but I'd
>> like to get a better insight for what is going on and why the child
>> task is terminating.
>
> You may want to try LSxxxx (Launch Services) routines.
>
> --
> Scott Ribe
> [email protected]
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to