Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidecar binaries not cleaned up when using prevent_exit and AppHandle::exit #2464

guillemcordoba opened this issue Aug 17, 2021 · 0 comments


Copy link

Describe the bug

Children processes are not cleaned up when using Event::ExitRequested's api.prevent_exit(), and invoking AppHandle::exit(0).

To Reproduce

Steps to reproduce the behavior:

  1. With a that looks like this and also launches sidecar binaries:
    .on_system_tray_event(|app, event| {
      match event {
        SystemTrayEvent::MenuItemClick { id, .. } => match id.as_str() {
          "quit" => {
          _ => {}
        _ => {}
    .expect("Error building app")
    .run(|_app_handle, event| {
          if let Event::ExitRequested { api, .. } = event {
  1. Run the tauri app.
  2. Execute the "quit" system tray item.
  3. See in the task administrator that the sidecar programs are still running.

Expected behavior

That the sidecar programs are shutdown when the api.exit(0); is executed

Platform and Versions (required):

Operating System - Windows, version 10.0.18363 X64
Webview2 - 92.0.902.73

Node.js environment
  Node.js - 14.17.3
  @tauri-apps/cli - 1.0.0-beta.7
  @tauri-apps/api - 1.0.0-beta.6

Global packages
  npm - 6.14.13
  yarn - 1.22.10

Rust environment
  rustc - 1.54.0
  cargo - 1.54.0

App directory structure

App - 1.0.0-beta.6
  build-type - bundle
  CSP - default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
  distDir - Set automatically by Vue CLI plugin
  devPath - Set automatically by Vue CLI plugin
  framework - Vue.js (Vue CLI)
  bundler - Webpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant