问题
Mac OS X Snow Leopard and Lion. I have a daemon (which runs from root) and launch agent which runs from current user. How can daemon request data (or send command) to launch agent?
回答1:
If you want to achieve simple IPC between the daemon and agent, refer to my answer here : OS X - Communication between launch daemon and launch agent.
Make sure to set up this socket-based communication on separate threads, so as not to interrupt the flow of your program.
来源:https://stackoverflow.com/questions/7375785/data-exchange-between-daemon-and-launch-agent