Apple has an outdated C API to start, stop, and enable startup services in launch.h. The source code for the API is on their open source site: https://opensource.apple.com/source/launchd/launchd-442.26.2/liblaunch/
Here is a sample code that asks the startup to start the LittleSnitchUIAgent service:
#include <launch.h>
int main(int argc, const char * argv[]) {
const char *job = "at.obdev.LittleSnitchUIAgent";
launch_data_t resp, msg;
msg = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
launch_data_dict_insert(
msg, launch_data_new_string(job), LAUNCH_KEY_STARTJOB);
resp = launch_msg(msg);
launch_data_free(msg);
return 0;
}
The LittleSnitchUIAgent - . , , .
, man- " " . Launchd : , , , , . , . , , API.