• 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
Fwd: Launching a process with Admin Privileges asynchronously
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Launching a process with Admin Privileges asynchronously


  • Subject: Fwd: Launching a process with Admin Privileges asynchronously
  • From: Saritha A <email@hidden>
  • Date: Wed, 1 Aug 2007 14:37:05 +0530


Hi all,
Sorry i forgot to mention the code i used to launch the app in my previous mail. Here is the part of the code,


agentTimeOutTimer = [[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(checkTimeLimit:) userInfo: [NSDictionary dictionaryWithObjectsAndKeys:@"AgentStartTask",@"Source",nil] repeats:YES] retain];
myStatus = AuthorizationExecuteWithPrivileges(myAuthorizationRef,
myToolPath, myFlags,(char * const *) myArguments, &myCommunicationsPipe);
if (myStatus == errAuthorizationSuccess) {
for(;;)
{
int bytesRead = read (fileno (myCommunicationsPipe),
myReadBuffer, sizeof (myReadBuffer));
if (bytesRead < 1) break;
NSLog(@"%s", myReadBuffer);
}
}


Thanks in Advance,
Saritha

Begin forwarded message:

From: Saritha A <email@hidden>
Date: 1 August 2007 2:31:29 PM GMT+05:30
To: email@hidden
Subject: Launching a process with Admin Privileges asynchronously

Hi all,

I am trying to launch a process using AuthorizeAndExecuteWithPrivileges() method. But problem with this method is it does not respond to timer. When the process does not respond for particular amount of time i want to kill that process. But I am unable to implement it using above method. I came to know that it is synchronous method so it does not respond to timer. Can anyone suggest me how to launch a process with admin privileges asynchronously or can anyone please suggest me any other alternative.

Thanks In Advance.
Saritha

_______________________________________________

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: 
 >Launching a process with Admin Privileges asynchronously (From: Saritha A <email@hidden>)

  • Prev by Date: Launching a process with Admin Privileges asynchronously
  • Next by Date: Re: appendBytes memcpy
  • Previous by thread: Launching a process with Admin Privileges asynchronously
  • Next by thread: Re: Launching a process with Admin Privileges asynchronously
  • Index(es):
    • Date
    • Thread