git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitb31a1a0519f22f2c5760ee67f69dac193a3d30da
parent43ef5ff66e
authorLucas Galante <[email protected]>
date2026-05-13 06:53
fix startup spawn: use spawn_command_bg for fd-closing

 src/wayland.rs | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/wayland.rs b/src/wayland.rs
index 1c08015..987dad0 100644
--- a/src/wayland.rs
+++ b/src/wayland.rs
@@ -463,15 +463,7 @@ impl Dispatch<RiverWindowManagerV1, ()> for AppState {
                     let apps: Vec<String> = state.wm.pending_startup_apps.drain(..).collect();
                     for cmd in &apps {
                         eprintln!("[init] spawning startup app: {}", cmd);
-                        match std::process::Command::new("sh")
-                            .arg("-c")
-                            .arg(cmd)
-                            .env_remove("WAYLAND_DEBUG")
-                            .spawn()
-                        {
-                            Ok(_) => eprintln!("[init] spawned ok: {}", cmd),
-                            Err(e) => eprintln!("[init] failed to spawn '{}': {e}", cmd),
-                        }
+                        crate::config::spawn_command_bg(cmd);
                     }
                     state.wm.startup_spawned = true;
                 }