[launchd-dev] Creating a Launch Agent (per user) on demand when client app is open
piotr.panasewicz at mac.com
Fri Jan 16 04:21:25 PST 2015
Seems I will encounter the same issues I am having now with listening on localhost or socket port option.
In my current implementation the agent sometimes starts as the second logged in user via fast user switching (so both sessions are GUI sessions and active at the time). So if I have an agent (with plist inside /Library/LaunchAgents, so it will work for each user logged in) monitoring localhost or the specific socket port, for which user the agent will run? Because both sessions are active and have GUI. How will I communicate with the one I want if the IPC between my app and the agent is base on one socket port 9977? If I run my app as User A I want the service to run only for the User A, not User B, or both.
> On 16 Jan 2015, at 09:11, Per Olofsson <per.olofsson at gu.se> wrote:
> 15 jan 2015 kl. 17:59 skrev Piotr Panasewicz <piotr.panasewicz at mac.com>:
>> Is it possible to do that without XPC?
> Yes, you can have the agent listen on a localhost or unix domain socket:
> Per Olofsson, IT-service, University of Gothenburg
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
More information about the launchd-dev