Mailing Lists: Apple Mailing Lists

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

NSTask



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

This email sent to 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.