forge
Explore
Log in

Don't you dare go Hollow

utils/spawning: Remove unnecessary cfgs

Browse files at this commit

54c2e2ab476629d17fdba861895f58e7cdac32abIvan MolodetskikhParent: df3f397
Forgotten when this was refactored.
src/utils/spawning.rsmodified+0 -4
@@ -332,7 +332,6 @@ mod systemd {
332 trace!("spawned PID: {pid}");332 trace!("spawned PID: {pid}");
333 333
334 // Start a systemd scope for the grandchild.334 // Start a systemd scope for the grandchild.
335- #[cfg(feature = "systemd")]
336 if let Err(err) = start_systemd_scope(command, child.id(), pid as u32) {335 if let Err(err) = start_systemd_scope(command, child.id(), pid as u32) {
337 trace!("error starting systemd scope for spawned command: {err:?}");336 trace!("error starting systemd scope for spawned command: {err:?}");
338 }337 }
@@ -351,7 +350,6 @@ mod systemd {
351 Some(child)350 Some(child)
352 }351 }
353 352
354- #[cfg(feature = "systemd")]
355 fn write_all(fd: impl AsFd, buf: &[u8]) -> rustix::io::Result<()> {353 fn write_all(fd: impl AsFd, buf: &[u8]) -> rustix::io::Result<()> {
356 let mut written = 0;354 let mut written = 0;
357 loop {355 loop {
@@ -367,7 +365,6 @@ mod systemd {
367 }365 }
368 }366 }
369 367
370- #[cfg(feature = "systemd")]
371 fn read_all(fd: impl AsFd, buf: &mut [u8]) -> rustix::io::Result<()> {368 fn read_all(fd: impl AsFd, buf: &mut [u8]) -> rustix::io::Result<()> {
372 let mut start = 0;369 let mut start = 0;
373 loop {370 loop {
@@ -387,7 +384,6 @@ mod systemd {
387 ///384 ///
388 /// This separates the pid from the compositor scope, which for example prevents the OOM killer385 /// This separates the pid from the compositor scope, which for example prevents the OOM killer
389 /// from bringing down the compositor together with a misbehaving client.386 /// from bringing down the compositor together with a misbehaving client.
390- #[cfg(feature = "systemd")]
391 fn start_systemd_scope(387 fn start_systemd_scope(
392 name: &OsStr,388 name: &OsStr,
393 intermediate_pid: u32,389 intermediate_pid: u32,