Re: AuthorizationExecuteWithPrivileges, night of the living dead
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.