Re: Running Shell Script from Cocoa Application
Re: Running Shell Script from Cocoa Application
- Subject: Re: Running Shell Script from Cocoa Application
- From: "Clark Cox" <email@hidden>
- Date: Sat, 6 Oct 2007 19:23:36 -0700
On 10/6/07, Daniel Dalquen <email@hidden> wrote:
>
> On Oct 6, 2007, at 10:21 PM, Sam DeVore wrote:
>
> > Probably looking for NSTask
>
> Is there a reason (not) to use the C function system(3)? What's the
> difference to NSTask (other than that it is an object)?
system() blocks
system() invokes a shell
However, since the OP wants to execute something with elevated
privileges, *neither* is an appropriate tool for this job (running
shell scripts as root is a *very* bad idea). You really need to use <a
href="http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/01introduction/chapter_1_section_1.html">Authorization
Services</a>
--
Clark S. Cox III
email@hidden
_______________________________________________
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