Re: NSTask
Re: NSTask
- Subject: Re: NSTask
- From: Charles Steinman <email@hidden>
- Date: Mon, 8 Dec 2008 15:50:54 -0800 (PST)
----- Original Message ----
> From: Filip van der Meeren <email@hidden>
> To: email@hidden
> Sent: Monday, December 8, 2008 2:21:18 PM
> Subject: NSTask
>
> I am trying to retrieve all paths that perl uses to retrieve modules.
> I found the command: "perl -v". I know how to parse this, but how do I get it
> inside my Cocoa application?
>
> I have tried to following:
>
> NSTask *task = [[[NSTask alloc] init] autorelease];
> [task setLaunchPath:@"/System/Library/Perl/5.8.8"];
> [task setArguments:[NSArray arrayWithObject:@"-v"]];
> [task launch];
> [task waitUntilExit];
Have you tried running "/System/Library/Perl/5.8.8 -v" in a shell? I think you'll find that fails too, because it is a directory.
Cheers,
Chuck
_______________________________________________
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 (From: Filip van der Meeren <email@hidden>) |