Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
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;
}