• 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: AuthorizationExecuteWithPrivileges, night of the living dead
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AuthorizationExecuteWithPrivileges, night of the living dead


  • Subject: Re: AuthorizationExecuteWithPrivileges, night of the living dead
  • From: Jerry LeVan <email@hidden>
  • Date: Fri, 2 Apr 2004 10:33:04 -0500

Putting the following in awakeFromNib seems easier than dealing with wait...

if(!eventWindow) // loading MainMenu.nib and not the dialog
{
myStatus =(OSStatus) AuthorizationCreate (NULL, kAuthorizationEmptyEnvironment,
kAuthorizationFlagDefaults, &myAuthorizationRef);
signal(SIGCHLD,SIG_IGN); // don't worry about death of children
...

Thanks for whoppin' me upside my haid...:)

--Jerry

On Apr 2, 2004, at 9:55 AM, Nick Zitzmann wrote:


On Apr 2, 2004, at 7:22 AM, Jerry LeVan wrote:

I just noticed that AuthorizationExecuteWithPrivileges creates
zombies...

Correct. When you run a task with AEWP(), the task is run asynchronously and it doesn't "reap" the child task when it's done. So you have to manually call wait() to reap each child task. This will also give you their termination status; see the wait() man page for details.

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >AuthorizationExecuteWithPrivileges, night of the living dead (From: Jerry LeVan <email@hidden>)
 >Re: AuthorizationExecuteWithPrivileges, night of the living dead (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: AuthorizationExecuteWithPrivileges, night of the living dead
  • Next by Date: Re: keyDown: missing events
  • Previous by thread: Re: AuthorizationExecuteWithPrivileges, night of the living dead
  • Next by thread: Re: keyDown: missing events
  • Index(es):
    • Date
    • Thread