aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-02-20 13:54:16 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-02-21 07:27:49 +0400
commitd58a45a96c2fce2602224cd246b3576d0c975cf3 (patch)
tree025af22a48cc4b778f17c22a9c901071e7f0195e /src/utils.rs
parent9f1b4ee2996bc75ba521e9d80f001c98e379b231 (diff)
downloadniri-d58a45a96c2fce2602224cd246b3576d0c975cf3.tar.gz
niri-d58a45a96c2fce2602224cd246b3576d0c975cf3.tar.bz2
niri-d58a45a96c2fce2602224cd246b3576d0c975cf3.zip
Add systemd feature flag for systemd-specific things
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 298dace1..5801de9e 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -229,7 +229,7 @@ fn spawn_sync(command: impl AsRef<OsStr>, args: impl IntoIterator<Item = impl As
trace!("spawned PID: {pid}");
// Start a systemd scope for the grandchild.
- #[cfg(feature = "dbus")]
+ #[cfg(feature = "systemd")]
if let Err(err) = start_systemd_scope(command, child.id(), pid as u32) {
trace!("error starting systemd scope for spawned command: {err:?}");
}
@@ -292,7 +292,7 @@ pub static IS_SYSTEMD_SERVICE: AtomicBool = AtomicBool::new(false);
///
/// This separates the pid from the compositor scope, which for example prevents the OOM killer
/// from bringing down the compositor together with a misbehaving client.
-#[cfg(feature = "dbus")]
+#[cfg(feature = "systemd")]
fn start_systemd_scope(name: &OsStr, intermediate_pid: u32, child_pid: u32) -> anyhow::Result<()> {
use std::fmt::Write as _;
use std::path::Path;