cloud storage client
git clone https://git.lucas.co/cce-cloud.git
fix: restore the reaping spawn cce-ui 4e94236 removed
cce-ui 4e94236 deleted its process module as caller-less, but the
launcher's spawn_detached went through cce_ui::process::spawn_detached to
reap every app it starts, so the crate no longer compiled against the
pinned toolkit. Add a local spawn_reaped — spawn, then wait on the child
from a background thread — under a distinct name because spawn_detached
here already names the launcher's own (program, args) wrapper. Kept local
rather than restored in the shared crate so the crate builds standalone
whatever the toolkit does next. Same fix as cce-mail d5f8394.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
src/main.rs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 875eded..22ba21e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -746,11 +746,22 @@ fn spawn_detached(program: &str, args: &[&str]) {
let _ = writeln!(f, "[spawn] executing: {} {}", program, args.join(" "));
cmd.stdout(f.try_clone().unwrap()).stderr(f);
}
- // Through the toolkit's reaping spawn, NOT a bare `cmd.spawn()`: the daemon
+ // Through the reaping spawn below, NOT a bare `cmd.spawn()`: the daemon
// lives for the whole session, and a dropped Child handle means every app
// it ever launched sits in the process table as a zombie once it exits —
// unreadable in /proc and reported "alive" by kill(pid, 0) probes.
- let _ = cce_ui::process::spawn_detached(cmd);
+ let _ = spawn_reaped(cmd);
+}
+
+/// Spawn `cmd` and reap it on a background thread. This was
+/// `cce_ui::process::spawn_detached` until the toolkit dropped that module
+/// (cce-ui 4e94236) as caller-less — `spawn_detached` above was a caller.
+fn spawn_reaped(mut cmd: std::process::Command) -> std::io::Result<()> {
+ let mut child = cmd.spawn()?;
+ std::thread::spawn(move || {
+ let _ = child.wait();
+ });
+ Ok(())
}