You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My sidecar is a PyInstaller Python app. Because it's a single file how it works is a PyInstaller bootloader creates a child process for my app, and thus the "app" works. There are two issues right now.
When I exit the Tauri app, the sidecar does not get killed.
When I manually kill the child, its child process is still alive
Describe the solution you'd like
Well I'd rather just that the Tauri sidecar cleans up for me. However, if that's not possible, I'd like a kill_all method like there used to be?
Alternatives considered
structMyStruct{
fn kill(&mutself){
if let Some(child) = self.child.take(){kill_process_tree(child.pid()).unwrap()}}}fnkill_process_tree(pid:u32) -> Result<(),String>{letmut system = System::new_all();
system.refresh_all();let root_pid = Pid::from_u32(pid);letmut to_kill = HashSet::new();// Collect all descendant PIDscollect_descendants(&system, root_pid,&mut to_kill);
to_kill.insert(root_pid);// Kill all processes (children first, then parent)for&pid in&to_kill {ifletSome(process) = system.process(pid){
process.kill_with(Signal::Kill);}}Ok(())}fncollect_descendants(system:&System,pid:Pid,descendants:&mutHashSet<Pid>){for(child_pid, process)in system.processes(){ifletSome(parent_pid) = process.parent(){if parent_pid == pid {
descendants.insert(*child_pid);collect_descendants(system,*child_pid, descendants);}}}}
Note that the PR that closed this only solves this for dev. In a bundled apps the sidecar behavior is still unchanged but there's a PR linked to the plugins-workspace issue I shared above.
Activity
[-][feat] Add kill tree[/-][+][feat] Add kill tree for side car[/+][-][feat] Add kill tree for side car[/-][+][feat] Add kill tree for sidecar[/+]FabianLars commentedon Oct 25, 2025
tauri-apps/plugins-workspace#1332
sakina1303 commentedon Nov 10, 2025
i'd love to work on this and come up with a soluion!
FabianLars commentedon Sep 19, 2026
Note that the PR that closed this only solves this for dev. In a bundled apps the sidecar behavior is still unchanged but there's a PR linked to the plugins-workspace issue I shared above.
FabianLars commentedon Oct 14, 2026
The PR was reverted for v2. v3 alpha contains it. I think the kill tree portion could be re-added to v2 though 🤔