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

Wrong process exit code on SIGTERM #18740

Open
7 tasks done
AriPerkkio opened this issue Nov 23, 2024 · 0 comments · May be fixed by #18741
Open
7 tasks done

Wrong process exit code on SIGTERM #18740

AriPerkkio opened this issue Nov 23, 2024 · 0 comments · May be fixed by #18741

Comments

@AriPerkkio
Copy link
Contributor

Describe the bug

Vite overrides exit code of the dev and preview servers when SIGTERM is captured. Exit code should be 143 but it's 0.

Reproduction

https://github.com/vitejs/vite

Steps to reproduce

Repro in Vite repository:

# Terminal 1
$ node packages/vite/dist/node/cli.js playground/alias/
# Terminal 2
$ pgrep node # Before running make there aren't other Node processes running
85978 # Pick your own ID here

$ kill 85978
# Terminal 1
# This should have exited from the node process
$ echo $?
0 # Expected 143, as other Node processes do

System Info

System:
    OS: macOS 15.1.1
    CPU: (8) arm64 Apple M2
    Memory: 860.53 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
    pnpm: 9.13.2 - ~/.nvm/versions/node/v20.18.1/bin/pnpm
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1.1
  npmPackages:
    @vitejs/release-scripts: ^1.3.2 => 1.3.2 
    rollup: ^4.23.0 => 4.24.4 
    vite: workspace:* => 6.0.0-beta.10

Used Package Manager

pnpm

Logs

No response

Validations

@AriPerkkio AriPerkkio linked a pull request Nov 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant