title: Keeping Program alive after manual close and start from /Applications
body: <p>I have written a plist file. The intention is to keep the program alive which is working fine. The problem that I discover is the following. 
  If I close the app and start it from the /Applications folder, the helper.plist which I created is not valid for it anymore.
  Now I know I can run a script that unloads and loads launchtctl. But this starts my program for a second time with the bundleId of the helper. </p>
  
  <p>Is there any way to reattach the program to the helper if I close the app manually or is this not possible? 
  Or would I have to code a wrapper app that only runs the script and has the real program in it's sources?
  Is there maybe a smarter solution how this can easily be done? I attached the plist below</p>
  
  <pre><code>&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;dict&gt;
      &lt;key&gt;Label&lt;/key&gt;
      &lt;string&gt;com.test.helper&lt;/string&gt;
      &lt;key&gt;Program&lt;/key&gt;
      &lt;string&gt;/Applications/test.app/Contents/MacOS/test&lt;/string&gt;
      &lt;key&gt;RunAtLoad&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;KeepAlive&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;SuccessfulExit&lt;/key&gt;
          &lt;false/&gt;
      &lt;/dict&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>