Skip to content

fix(unified): make tray quit non-blocking and stop every sidecar descendant - #148

Merged
tnunamak merged 2 commits into
integration/unified-stackfrom
fix/unified-quit-hang
Sep 16, 2026
Merged

tnunamak merged 2 commits into
integration/unified-stackfrom
fix/unified-quit-hang

Conversation

@tnunamak

@tnunamak tnunamak commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Tray Quit or an external SIGTERM could leave the unified reference implementation and console sidecars, including descendants, running after DataConnect terminated.

The first fix routes RunEvent::ExitRequested through one background shutdown path, prevents the first exit request, stops both sidecars concurrently under a ten-second budget, and calls app.exit only after cleanup. The follow-up finding was that a default external signal terminates the Rust process before Tauri reaches RunEvent::ExitRequested or RunEvent::Exit; the supervisor now registers active POSIX process-group IDs and a signal-handling thread sends SIGKILL to every registered process group before restoring default signal termination. The normal menu path keeps its bounded graceful-signal, polling, and force-kill sequence.

Evidence: the Unix parent-signal test starts a grouped sidecar plus descendant, sends SIGTERM to the helper parent, and verifies both processes die; the supervisor suite passes 9/9 runnable tests with one helper ignored, and the unified suite passes 7/7. Full cargo test --all-targets reports 200 passed, 34 failed, and 4 ignored; I did not resolve those failures because they match this checkout's known missing packaged connector/runtime artifacts, including p-queue and patchright. Remaining uncertainty: clippy is still blocked by pre-existing errors in src/commands/oci.rs, and GUI quit behavior was not manually verified because the task brief forbids launching the app.

Assisted-by: AI

…endant

Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Assisted-by: AI
Signed-off-by: Tim Nunamaker <tnunamak@gmail.com>
Assisted-by: AI
@tnunamak
tnunamak merged commit e4c6a2b into integration/unified-stack Sep 16, 2026
15 of 16 checks passed
@tnunamak
tnunamak deleted the fix/unified-quit-hang branch September 16, 2026 23:20
@tnunamak

Copy link
Copy Markdown
Contributor Author

Folded into #141. Assisted-by: AI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant