• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: NSDictionary mutability test
  • Next by Date: Re: NSDictionary mutability test
  • Previous by thread: Re: NSTask
  • Next by thread: NSTask and environment variables
  • Index(es):
    • Date
    • Thread