service manager (), which is developed by the developers of the GNU Guix System distribution as a supporting dependency alternative to the SysV-init initialization system. The managing daemon and the Shepherd utilities are written in Guile (one of the implementations of the Scheme language), which is also used to define settings and parameters for launching services. Shepherd is already used in the GuixSD GNU/Linux distribution and is also aimed at use in GNU/Hurd, but can work in any POSIX-compliant OS for which the Guile language is available.
Shepherd can be used both as the main initialization system (init with PID 1) and in a standalone mode to manage background processes of individual users (for example, to launch tor, privoxy, mcron, etc.) executing with the rights of those users. Shepherd handles the starting and stopping of services, taking into account the interdependencies between services, dynamically determining and launching the services that the chosen service depends on. Shepherd also supports defining conflicts between services and prevents them from running simultaneously.
Key innovations:
- The make-kill-destructor implements killing a group of processes;
- A parameter 'default-pid-file-timeout' has been added to define the wait time for the creation of the PID file;
- If the PID file does not appear within the timeout, the entire group of processes is ensured to be terminated (solving the issue of leaving worker processes without a PID file);
- The #:file-creation-mask parameter has been added to the 'make-forkexec-constructor', enabling the creation of log files and ending support for the old call agreement;
- Compilation issues on systems without prctl, such as GNU/Hurd, have been resolved;
- A bug that caused SIGALRM to be sent every second has been fixed.
Source: opennet.ru
