Go to file
Henri Chain 596e447076 Reintroduce ExitType
This introduces `ExitType=main|cgroup` for services.
Similar to how `Type` specifies the launch of a service, `ExitType` is
concerned with how systemd determines that a service exited.

- If set to `main` (the current behavior), the service manager will consider
  the unit stopped when the main process exits.

- The `cgroup` exit type is meant for applications whose forking model is not
  known ahead of time and which might not have a specific main process.
  The service will stay running as long as at least one process in the cgroup
  is running. This is intended for transient or automatically generated
  services, such as graphical applications inside of a desktop environment.

Motivation for this is #16805. The original PR (#18782) was reverted (#20073)
after realizing that the exit status of "the last process in the cgroup" can't
reliably be known (#19385)

This version instead uses the main process exit status if there is one and just
listens to the cgroup empty event otherwise.

The advantages of a service with `ExitType=cgroup` over scopes are:
- Integrated logging / stdout redirection
- Avoids the race / synchronisation issue between launch and scope creation
- More extensive use of drop-ins and thus distro-level configuration:
  by moving from scopes to services we can have drop ins that will affect
  properties that can only be set during service creation,
  like `OOMPolicy` and security-related properties
- It makes systemd-xdg-autostart-generator usable by fixing [1], as obviously
  only services can be used in the generator, not scopes.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:23 +01:00
.github CI: disable code coverage in GH Action 2021-10-21 00:10:52 +01:00
.lgtm/cpp-queries lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC] 2019-04-10 20:03:38 +02:00
.semaphore ci: use LGPLv2+ for all our ci configuration 2021-10-01 14:45:00 +02:00
catalog units: added factory-reset.target 2021-08-10 17:08:00 +02:00
coccinelle alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere 2021-10-14 15:57:52 +02:00
docs Reintroduce ExitType 2021-11-08 10:15:23 +01:00
factory/etc pam: fix typo try_authtok → use_authtok 2021-05-12 12:14:17 +02:00
hwdb.d hwdb: Tag IR cameras as such 2021-10-27 00:14:41 +02:00
LICENSES licensing: add a license file for the fonts we carry 2021-10-18 09:43:18 +02:00
man Reintroduce ExitType 2021-11-08 10:15:23 +01:00
mkosi.default.d mkosi: Add netcat to fedora image 2021-10-30 22:13:46 +01:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network licensing: add missing header to one .network file 2021-10-01 14:45:00 +02:00
po gitattributes: introduce and use "generated" attribute 2021-10-18 09:42:55 +02:00
presets boot: optionally update sd-boot on boot 2021-07-30 17:19:55 +02:00
rules.d hwdb: Tag IR cameras as such 2021-10-27 00:14:41 +02:00
shell-completion Reintroduce ExitType 2021-11-08 10:15:23 +01:00
src Reintroduce ExitType 2021-11-08 10:15:23 +01:00
sysctl.d meson: use a/b instead of join_paths(a,b) 2021-07-27 19:32:35 +02:00
sysusers.d meson: minor cleanup 2021-07-11 18:00:28 +02:00
test Reintroduce ExitType 2021-11-08 10:15:23 +01:00
tmpfiles.d tmpfiles.d: remove .Test-unix, it's obsolete 2021-08-31 10:57:37 +02:00
tools meson-render-jinja2: use ast.literal_eval() 2021-11-05 14:56:32 +01:00
units Merge pull request #20902 from tasleson/integritysetup-generator 2021-10-15 18:57:17 +02:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format clang-format: set SpaceBeforeParens to ControlStatementsExceptForEachMacros 2020-11-16 16:57:51 +09:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig editorconfig: set maximum line length to 109 for man/*.xml files 2021-09-30 13:45:34 +02:00
.gitattributes gitattributes: introduce and use "generated" attribute 2021-10-18 09:42:55 +02:00
.gitignore Ignore local files in subdirectories of mkosi.default.d/ as well 2021-10-14 14:07:16 +02:00
.lgtm.yml ci: bump meson version in LGTM 2021-07-28 11:26:10 +02:00
.mailmap mailmap: two more names 2021-03-30 13:17:58 +02:00
.packit.yml Revert "ci: temporarily set -Wno-deprecated-declarations in Packit" 2021-09-29 15:04:24 +02:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson.build meson: use partial_dependency() to get include directory 2021-10-19 08:46:29 +02:00
meson_options.txt meson: allow extra net naming schemes to be defined during configuration 2021-09-28 14:22:40 +02:00
mkosi.build licensing: add forgotten spdx headers 2021-10-01 14:45:00 +02:00
NEWS Merge pull request #20219 from khfeng/use-intel-hid-rfkill 2021-09-29 18:53:22 +02:00
README change req meson version 2021-10-26 09:29:14 +01:00
README.md README: fix CentOS CI badge 2021-10-23 21:46:53 +02:00
TODO update TODO 2021-10-28 08:17:46 +02:00

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
Language Grade: C/C++
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Coverage Status
Packaging status

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.