Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask



----- 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >NSTask (From: Filip van der Meeren <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.