• 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: Capturing output from another task with elevated privilages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Capturing output from another task with elevated privilages


  • Subject: Re: Capturing output from another task with elevated privilages
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 1 Jul 2010 10:51:47 -0500

On Jul 1, 2010, at 9:37 AM, Eric Hoaglin wrote:

> I'm trying to capture the output of the task that I run. and from what I understand, if you want to do so, you pass a FILE*
> to AuthorizationExecuteWithPrivileges and then just read it as a normal file (which you can see from lines 29-45
>
> I'm not sure I'm doing it correctly, as when I run my app in the Xcode debugger, the output gets to the debug console, but doesn't show up
> when I run it from a normal build. I know there is output from the task because I can see it... in the debug console.. but not from my own
> NSLOG tests.

According to the docs, AuthorizationExecuteWithPrivileges captures standard output from the task, but it doesn't say it captures standard error.  If the tool is outputting to stderr, then that will probably go to the same place that the parent's stderr is going, which is often the console log (/dev/console, viewable via Console.app).  When run under Xcode, stderr goes to Xcode's console window.

Regards,
Ken

_______________________________________________

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: 
 >Capturing output from another task with elevated privilages (From: Eric Hoaglin <email@hidden>)

  • Prev by Date: KVO question
  • Next by Date: Re: class_respondsToSelector() in runtime.h?
  • Previous by thread: Capturing output from another task with elevated privilages
  • Next by thread: Re: Capturing output from another task with elevated privilages
  • Index(es):
    • Date
    • Thread