The Daemon is responsible of keeping track of the services and starting them up. It is a a User Process.
For example, the block responsible for starting the Window manager.
printf("Creating Service for System Daemon... "); Service DaemonService = {"unified.daemon",getpid() };handle_t handle =CreateService("unified.daemon");if(!handle){printf("Failed\n");fflush(stdout);return-1; }fcntl(handle, F_SETFD, FD_CLOEXEC); // FD_CLOSEX to say its separate and to not copy handles.printf("Done\n");fflush(stdout);
Eventually this is to be made automatic using a json file to find what services to start and their name and location.