Two years after the release of the last significant version, the GNU Shepherd service manager 0.9 (formerly dmd) has been released. It is developed by the developers of the GNU Guix System distribution as an alternative to the SysV-init initialization system, which supports dependencies. The managing daemon and Shepherd utilities are written in Guile (one of the implementations of the Scheme language), which is also used for defining service configurations and startup parameters. Shepherd is already deployed in the GuixSD GNU/Linux distribution and is also aimed at use in GNU/Hurd but can operate on any POSIX-compliant OS where Guile is available.
Shepherd handles the starting and stopping of services, taking into account the interdependencies between them, dynamically identifying and launching services on which the selected service depends. Shepherd also supports conflict resolution between services and prevents them from running simultaneously. The project can serve both as the primary initialization system (init with PID 1) and in a standalone manner for managing background processes of individual users (e.g., for running tor, privoxy, mcron, etc.) with execution under the authority of those users.
Key innovations:
- The concept of transient services has been implemented, which are automatically disabled after completion due to the termination of the process or invocation of the 'stop' method. This may be necessary for synthesized services that cannot be restarted after completion.
- To create inetd-like services, the 'make-inetd-constructor' procedure has been added.
- To create services activated by network activity (in the style of systemd socket activation), the 'make-systemd-constructor' procedure has been added.
- A procedure for starting services in the background — 'start-in-the-background' — has been added.
- The 'make-forkexec-constructor' procedure has been augmented with the parameters ':supplementary-groups', '#:create-session', and '#:resource-limits'.
- Non-blocking operation is ensured during the waiting for PID files.
- For services without the ':log-file' parameter, output to syslog is provided, and for services with the ':log-file' parameter, logs are written to a separate file with timestamps. Logs from the unprivileged shepherd process are stored in the $XDG_DATA_DIR directory.
- Support for building with Guile 2.0 has been dropped. Issues with using Guile versions 3.0.5-3.0.7 have been resolved.
- Now, the Fibers library version 1.1.0 or newer is required for operation.
Source: opennet.ru
