How to check if service is enabled with launchd

Posted by spartygw on Stack Overflow See other posts from Stack Overflow or by spartygw
Published on 2013-06-11T15:43:48Z Indexed on 2013/06/25 4:21 UTC
Read the original article Hit count: 153

Filed under:
|

I can't figure out how to check from within C/C++ if a service is enabled via launchd. I know I can use launchctl from the command line and am currently executing ' launchctl list myServiceName ' from fork/exec.

I've found that boostrap_look_up() might be the way to check this but I can't find enough documentation to condense this down to a simple example.

Can you shed light on this? All I need is a small function to test if my service is actually registered and available.

© Stack Overflow or respective owner

Related posts about osx

Related posts about launchd