Re: NSTask and 10.9
Re: NSTask and 10.9
- Subject: Re: NSTask and 10.9
- From: Ken Thomases <email@hidden>
- Date: Tue, 26 Nov 2013 22:01:33 -0600
On Nov 26, 2013, at 9:47 AM, koko wrote:
> NSTask *task;
> task = [[NSTask alloc] init];
> [task setLaunchPath:rootScriptPath];
> [task setArguments:[NSArray arrayWithObjects:rootpath, nil]];
> [task waitUntilExit];
> [task launch];
> [task release];
You have the invocation of -launch and -waitUntilExit in the wrong order. I have no idea what it could mean to wait for the task to exit before it's launched. I wouldn't be surprised if that's what is throwing the exception.
That said, I agree with the suggestion to delete the files from within the parent process rather than launching a script to do it.
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