Release of the GNU Shepherd 0.9 init system

Two years after the formation of the last significant release, the GNU Shepherd 0.9 (formerly dmd) service manager has been published, which is being developed by the developers of the GNU Guix System distribution as an alternative to the dependency-aware SysV-init initialization system. The Shepherd control daemon and utilities are written in the Guile language (one of the implementations of the Scheme language), which is also used to define settings and parameters for starting services. Shepherd is already used in the GuixSD GNU/Linux distribution and is also intended for use in GNU/Hurd, but can run on any POSIX-compliant OS for which the Guile language is available.

Shepherd does the work of starting and stopping services by taking into account the relationship between services, dynamically determining and starting the services on which the selected service depends. Shepherd also supports conflict detection between services and prevents them from running concurrently. The project can be used both as the main initialization system (init with PID 1) and as a standalone to manage background processes of individual users (for example, to run tor, privoxy, mcron, etc.) with execution with the rights of these users.

Main innovations:

  • The concept of temporary services (transient) has been implemented, which are automatically disconnected after completion due to the termination of the process or a call to the "stop" method, which may be required for synthesized services that cannot be restarted after shutdown.
  • Added "make-inetd-constructor" procedure to create inetd-like services.
  • To create services that are activated by network activity (in the style of systemd socket activation), the "make-systemd-constructor" procedure has been added.
  • Added a procedure for starting the service in the background - "start-in-the-background".
  • Added ":supplementary-groups", "#:create-session", and "#:resource-limits" parameters to "make-forkexec-constructor" procedure.
  • Provided work without blocking while waiting for PID files.
  • For services without the "#:log-file" parameter, output to syslog is provided, and for services with the "#:log-file" parameter, the log is written to a separate file with the recording time. Logs from the unprivileged shepherd process are stored in the $XDG_DATA_DIR directory.
  • Support for building with Guile 2.0 has been dropped. Resolved issues when using Guile versions 3.0.5-3.0.7.
  • Fibers library 1.1.0 or newer is now required to work.

Source: opennet.ru

Add a comment