NSTask
NSTask
- Subject: NSTask
- From: Filip van der Meeren <email@hidden>
- Date: Mon, 8 Dec 2008 23:21:18 +0100
Good evening (for my region),
I am currently working on a small project to manage the different
builds of perl and its modules. Since it is such a hassle to find/
install PerlModules and newer builds of Perl itself.
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];
But it seems to get the same exception every time I try this, even in
different configs.
2008-12-08 23:15:11.459 PerlManager[924:203] *** NSTask: Task create
for path '/System/Library/Perl/5.8.8' failed: 13, "Permission
denied". Terminating temporary process.
Any ideas on how to fix my problem ?
Thank you,
Filip van der Meeren
email@hidden
http://www.sourceforge.net/projects/perlmanager
_______________________________________________
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