Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/paperforge-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,16 @@ async fn run_daemon(cfg: Config) -> anyhow::Result<()> {
Arc::new(RwLock::new(pause_cfg)),
);

// 3b. Spawn the LWE pool watchdog. The watchdog tick is 5s by
// default; it re-spawns LWE from the last-known bindings
// when the tracked PID dies (OOM, segfault, manual kill) or
// is recycled by the kernel. No-op when the pool has never
// been bound. The watchdog is aborted by `pool.shutdown()`
// in step 7 below so SIGTERM-driven shutdown exits cleanly.
if cfg.pool_enabled {
lwe_ops.backend().pool().spawn_watchdog().await;
}

// 4. D-Bus layer (consumes event_rx).
let ctrl: Arc<dyn PaperforgeControl> = daemon.clone();
let dbus_handle = tokio::spawn(serve_dbus(ctrl, event_rx));
Expand Down
Loading
Loading