• 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: Running Shell Script from Cocoa Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Running Shell Script from Cocoa Application
      • From: Daniel Dalquen <email@hidden>
References: 
 >Running Shell Script from Cocoa Application (From: JanakiRam <email@hidden>)
 >Re: Running Shell Script from Cocoa Application (From: Sam DeVore <email@hidden>)
 >Re: Running Shell Script from Cocoa Application (From: Daniel Dalquen <email@hidden>)

  • Prev by Date: Re: Game framework?
  • Next by Date: NSTextField in NSWindow using setAlphaValue
  • Previous by thread: Re: Running Shell Script from Cocoa Application
  • Next by thread: Re: Running Shell Script from Cocoa Application
  • Index(es):
    • Date
    • Thread