diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-11-11 14:11:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 14:11:02 +0100 |
commit | 23dce98e89616092007005692a4574ab908db5a6 (patch) | |
tree | 829c00842440ba9fb8c42d765b25b341860ba45c /units | |
parent | NEWS,man: tweak the description of FixedRandomDelay= (diff) | |
parent | user: move "extrinsic" units to their root slice (diff) | |
download | systemd-23dce98e89616092007005692a4574ab908db5a6.tar.xz systemd-23dce98e89616092007005692a4574ab908db5a6.zip |
Merge pull request #16603 from benzea/benzea/special-app-slice
Use app.slice by default in user manager (and define special user slices)
Diffstat (limited to 'units')
-rw-r--r-- | units/user/app.slice | 12 | ||||
-rw-r--r-- | units/user/background.slice | 12 | ||||
-rw-r--r-- | units/user/meson.build | 3 | ||||
-rw-r--r-- | units/user/session.slice | 12 | ||||
-rw-r--r-- | units/user/systemd-exit.service | 4 | ||||
-rw-r--r-- | units/user/systemd-tmpfiles-clean.service | 1 |
6 files changed, 44 insertions, 0 deletions
diff --git a/units/user/app.slice b/units/user/app.slice new file mode 100644 index 0000000000..065ea77e96 --- /dev/null +++ b/units/user/app.slice @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=User Application Slice +Documentation=man:systemd.special(7) diff --git a/units/user/background.slice b/units/user/background.slice new file mode 100644 index 0000000000..03c89b66be --- /dev/null +++ b/units/user/background.slice @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=User Background Tasks Slice +Documentation=man:systemd.special(7) diff --git a/units/user/meson.build b/units/user/meson.build index b2a599b6d8..337a92092d 100644 --- a/units/user/meson.build +++ b/units/user/meson.build @@ -1,6 +1,8 @@ # SPDX-License-Identifier: LGPL-2.1-or-later units = [ + 'app.slice', + 'background.slice', 'basic.target', 'bluetooth.target', 'default.target', @@ -9,6 +11,7 @@ units = [ 'graphical-session.target', 'paths.target', 'printer.target', + 'session.slice', 'shutdown.target', 'smartcard.target', 'sockets.target', diff --git a/units/user/session.slice b/units/user/session.slice new file mode 100644 index 0000000000..e0b38c5e32 --- /dev/null +++ b/units/user/session.slice @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=User Core Session Slice +Documentation=man:systemd.special(7) diff --git a/units/user/systemd-exit.service b/units/user/systemd-exit.service index 91953e0524..18725253bb 100644 --- a/units/user/systemd-exit.service +++ b/units/user/systemd-exit.service @@ -14,3 +14,7 @@ DefaultDependencies=no Requires=shutdown.target After=shutdown.target SuccessAction=exit-force + +[Service] +# Place into the root slice to not keep another slice unit alive +Slice=-.slice diff --git a/units/user/systemd-tmpfiles-clean.service b/units/user/systemd-tmpfiles-clean.service index ff319d2b3a..6a937071f7 100644 --- a/units/user/systemd-tmpfiles-clean.service +++ b/units/user/systemd-tmpfiles-clean.service @@ -19,3 +19,4 @@ Type=oneshot ExecStart=systemd-tmpfiles --user --clean SuccessExitStatus=DATAERR IOSchedulingClass=idle +Slice=background.slice |