launchd keeps restarting my binary in /Library/PrivilegedHelperTools I am looking to install a privileged helper tool using SMJobBless.
My plist only contains the MachServices key and RunAtLoad key. The RunAtLoad is set to true as I want to be launched automatically after install.

Now, the problem is that once the helper tool is installed and launched and it completes its job successfully - it gets relaunched and this keeps happening again and again.

Original launchd Job Ticket

&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;  
&lt;plist version="1.0"&gt;  
&lt;key&gt;Label&lt;/key&gt;  
&lt;string&gt;com.ak.SMJobBlessHelper&lt;/string&gt;  
&lt;key&gt;MachServices&lt;/key&gt;  
&lt;dict&gt;  
&lt;key&gt;com.ak.SMJobBlessHelper.mach&lt;/key&gt;  
&lt;true/&gt;  
&lt;/dict&gt;  
&lt;key&gt;ProgramArguments&lt;/key&gt;  
&lt;array&gt;  
&lt;string&gt;/Library/PrivilegedHelperTools/com.ak.SMJobBlessHelper&lt;/string&gt;  
&lt;/array&gt;  
&lt;key&gt;RunAtLoad&lt;/key&gt;  
&lt;true/&gt;  
&lt;/plist&gt;


I have tried various things to stop it from launching again but in vain:  


Tried to add KeepAlive to false in the plist.  
Tried to add KeepAlive as a dictionary with the key SuccessfulExit to false.  
Tried to make my app sleep for occult times before quitting like sleeping for 5 minutes, 10 minutes etc. but it still gets launched again.


I have basically run out of ideas, I want it to launch only when I ask and not automatically and that too again and again.

Please help. Thank you very much.  



OS: Mac OS X 10.8.4 12E55
Xcode: 4.6.2 (4H1003)
The launchd job ticket in the question is malformed; the root object must be a dict:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
   ...
&lt;/dict&gt;
&lt;/plist&gt;


Assuming this is a copy and paste error, how quickly does your com.ak.SMJobBlessHelper complete?

Some launchd configurations require the process remain running for a minimum of 30 seconds – else launchd will consider the process as crashed and automatically relaunch it.

Does your com.ak.SMJobBlessHelper conform to the requirements set out in the launchd documentation?