Hi, I'm having trouble with unloading jobs launched from /Library/LaunchAgents and since I haven't had success in googling around I decided to ask for help here. I have an agent application which should run in the LoginWindow and Aqua contexts. A proper plist file has been created and works fine, the job loads and unloads automagically when the different sessions are entered/left. Now, the problem is with uninstallation. I have a separate uninstaller application which, at some point, is elevated to have root privileges to perform removal of files etc. Unfortunately, when running as root, launchctl does not seem to access the session of the logged in users, thus making it impossible to unload these already active jobs. I suppose calling launchctl as a regular user wouldn't work either for user sessions other than the current one. Can anyone give me pointers how to solve this? I do have read the Daemonomicon and also the list archives of last year but I might have missed the answer. Thanks, Tamas Lustyik
At 15:15 +0100 12/2/10, Tamás Lustyik - NTRglobal wrote:
Can anyone give me pointers how to solve this? I do have read the Daemonomicon and also the list archives of last year but I might have missed the answer.
Well, the answer is here, you just have to read my posts over the past N years and assemble them into a coherent whole (-: To save you that 'fun' job, I've done the work and posted it as a reply to "[launchd-dev] launch_msg(): Socket is not connected error in Leopard". Check it out. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
participants (2)
-
Quinn
-
Tamás Lustyik - NTRglobal