From 266b8e3802e22cd0da6eb5f24b269278c80d1bf4 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Tue, 15 Sep 2026 21:37:49 +0300 Subject: fix: preserve macos services across logout (#4202) refs #4100 --- src/platform/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/platform/mod.rs') diff --git a/src/platform/mod.rs b/src/platform/mod.rs index 70047fef..eb84e0b1 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -153,10 +153,18 @@ pub fn launch_server_daemon_command(command: &mut std::process::Command) -> std: command.spawn().map(|child| child.id()) } +#[cfg(not(target_os = "macos"))] +pub(crate) fn prepare_server_process(_handoff_import: bool) -> std::io::Result { + Ok(false) +} + #[cfg(any(target_os = "linux", target_os = "macos"))] pub fn detach_server_daemon_command(command: &mut std::process::Command) { use std::os::unix::process::CommandExt; + #[cfg(target_os = "macos")] + macos::configure_server_daemon_context(command); + unsafe { command.pre_exec(|| { if libc::setsid() < 0 { -- cgit v1.2.3