[launchd-dev] 'launchctl remove' synchronicity

Thomas Clement tclementdev at gmail.com
Fri May 4 01:19:24 PDT 2012


Hello list,

It seems "launchctl remove" and "launchctl unload" do not behave in the same way when unregistering a job from launchd.
I can reload a job by doing "launchctl unload" / "launchctl load" and it works fine. However doing "launchctl remove" / "SMJobSubmit" makes launchd complain about "Conflict with job: job_label over Mach service: service_name".

It seems that when SMJobSubmit is called and tries to load the job, the Mach services of the previous instance of the job are still registered into launchd. Adding a delay between "launchctl remove" and "SMJobSubmit" seems to solve the issue.

Is this to be expected?


Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20120504/91c540c5/attachment.html>


More information about the launchd-dev mailing list