diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 8fdefa9f7..e3c9f71a6 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,16 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2016-08-09 + + + [dj] - Added explanatory text for systemd-230+ process + lingering changes. + + + + 2016-08-06 diff --git a/chapter07/systemd-custom.xml b/chapter07/systemd-custom.xml index 26f29beb4..4a5a0187e 100644 --- a/chapter07/systemd-custom.xml +++ b/chapter07/systemd-custom.xml @@ -173,4 +173,60 @@ EOF + + + Long Running Processes + + Beginning with systemd-230, all user processes are killed when a + user session is ended, even if nohup is used, or the process uses + daemon() or setsid(). This is a + deliberate change from a historically permissive environment to a more + restrictive one. The new behavior may cause issues if you depend on long + running programs (e.g., screen or + tmux) to remain active after ending your user + session. There are three ways to enable lingering processes to remain after + a user session is ended. + + + + + Enable process lingering for only needed users: + normal users have permission to enabling process lingering + with the command loginctl enable-linger for their + own user. System administrators can use the same command with a + user argument to enable for a user. That user + can then use the systemd-run command to start + long running processes. For example: systemd-run --scope + --user /usr/bin/screen. If you enable lingering for your + user, the user@.service will remain even after all login sessions are + closed, and will automatically start at system boot. This has the + advantage of explicitly allowing and disallowing processes to run + after the user session has ended, but breaks backwards compatibility + with tools like nohup and utilities that use + deamon(). + + + + + Enable system-wide process lingering: + you can set KillUserProcesses=no in + /etc/logind.conf to enable process lingering + globally for all users. This has the benefit of leaving the old + method available to all users at the expense of explicit control. + + + + + Disable at build-time: You can enable + lingering by default while building systemd by adding the switch + --without-kill-user-processes to the + configure command for systemd. This completely + disables the ability of systemd to kill user processes at session + end. + + + + + + diff --git a/general.ent b/general.ent index 40887a445..cbffce239 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - + diff --git a/packages.ent b/packages.ent index c375a90df..af61289d9 100644 --- a/packages.ent +++ b/packages.ent @@ -188,7 +188,7 @@ - +