Re: Fun with AuthorizationExecuteWithPrivileges...
Re: Fun with AuthorizationExecuteWithPrivileges...
- Subject: Re: Fun with AuthorizationExecuteWithPrivileges...
- From: j o a r <email@hidden>
- Date: Tue, 14 Aug 2001 12:15:49 +0200
On Tuesday, August 14, 2001, at 02:19 , Andreas Monitzer wrote:
Yes, you and everybody else is missing a good API. The only known way
of doing this is to get the PID of the created process via the pipe (or
some lock-file) and call /bin/kill via the security API (requires
another authorization).
I'm doing this another way around - and would love a comment on my
approach.
I create a run loop in my tool, and a DO connection to the main program.
When I wan the tool to quit, I invalidate the NSConnection that ties the
two together. This causes the run loop in the tool to quit, and hence
the tool terminate.
In this way I can communicate with the tools using "normal" method calls
through DO, and I don't have to fiddle with the pipe at all (I tried the
manpages for stdio, but found them confusing).
Is this OK to do?
Regards,
j o a r