Hello, I'm currently involved in the development of an SSH tunnel management application that strongly relies on launchd (http://vortex-ssh.googlecode.com for the curious). The application is composed of two elements. The first element is a PreferencePane that takes care of the tunnels creation. It generates a launchd-compatible property list for each configured ssh connection, and it will be responsible for loading/unloading of the plists into launchd. The second element is a launchd agent that periodically polls the status of the SSH connections and update some GUI. I'm perfectly aware that this question may have already been asked numerous time (and I'm in advance sorry for this), but is there any kind of documentation concerning the message exchanges with launchd (SampleD not really helping)? Reading launchctl.c I've already been able to do some of the polling code of the agent (even though some data structure are still a complete mystery as I speak), but the load/ unload part seems really intricate, and I'm afraid to be obliged to use execve + launchctl to make it work. Thank you for your time and your help. Regards, Xavier ----- Xavier Guérin - Doctoral student TIMA Laboratory, SLS Group 46, av. Félix Viallet, 38000 GRENOBLE, FR Mail : xavier.guerin@imag.fr Phone : +33(0)4 76 57 47 59 Ad Astra Per Aspera Triste e' quel discepolo che non avanza il suo maestro
At 22:03 +0100 28/1/09, Xavier Guérin wrote:
Reading launchctl.c I've already been able to do some of the polling code of the agent (even though some data structure are still a complete mystery as I speak), but the load/unload part seems really intricate, and I'm afraid to be obliged to use execve + launchctl to make it work.
Right now the <launch.h> API is only rated for daemons checking in with launchd (ala SampleD). It is not really designed for job management. Rather, we recommend that folks do their job management by fork/exec of launchctl. S+E -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
participants (2)
-
Quinn
-
Xavier Guérin