title: Need documentation for Apple launch.h api
body: <p>I have a service loaded via terminal as
  launchctl load /System/Library/LaunchAgent/com.example.my.plist </p>
  
  <p>Now, I need to programmatically detect if the service is running or not and start the service.
  <a href="http://www.opensource.apple.com/source/launchd/launchd-328/launchd/src/launch.h" rel="nofollow">http://www.opensource.apple.com/source/launchd/launchd-328/launchd/src/launch.h</a>
  Above is the link to launch.h api provided by Apple that helps to achieve this.</p>
  
  <p>Can anyone help me with its documentation?
  or, help me how to use the api to check the status of a service and to launch the same.</p>
  
  <p>Thanks.</p>