• 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: Filip van der Meeren <email@hidden>
  • Date: Mon, 8 Dec 2008 23:40:37 +0100

Ok, I did not type out the example as I should, but still, it fails.
With an no permission exception.
And I would love to execute the example with something like:

[task setLaunchPath:@"perl"];

You never know what version is installed on the target computer...

Filip van der Meeren
email@hidden
http://www.sourceforge.net/projects/perlmanager

On 08 Dec 2008, at 23:33, Torsten Curdt wrote:

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];

You might want to point it to an executable ;) ...not just a path and option.


Depending on want you want to do NSTask might not be as easy to use as
it looks on the first glance. You might want to re-use some existing
wrapper. Here is one for example:

http://github.com/tcurdt/feedbackreporter/tree/master/Sources/Main/FRCommand.m

HTH
--
Torsten

_______________________________________________

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>)
 >Re: NSTask (From: "Torsten Curdt" <email@hidden>)

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