-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Running launchpad in a Windows 11 terminal (instead of directly via cmd.exe) and closing the host (or hitting CTRL+C if launching through a .bat file via explorer) doesn't emit any exit/sigint signals.
How to Reproduce
- On Windows 11, set the default terminal application to
Let Windows decideorWindows Terminal:

- Option A: Close terminal window without CTRL+C
- Launch a new terminal window
- Run launchpad via
npx launchpadand close the terminal window
- Option B: Run launchpad via
.batthat runs in terminal- Create a
.batfile that runsnpx launchpad - With Windows Terminal set as the default terminal application, launch the bat file
- Enter CTRL+C or close the window
- Create a
Expected Behavior
App should receive exit or sigint events from process.
Observed Behavior
App silently exists
Side-Effects
- Apps aren't closed on exit
- When launchpad is relaunched, it will launch additional app instances (since PM2 isn't run as a daemon anymore as of Connect to pm2 in
no-daemon-mode#90 ) - Temp files and downloads could be corrupted
Possible Solutions
- Run launchpad as a daemon (e.g. via
nodemon):npx launchpad-> spawns daemon ->launchpad.startup() -> contents of currentindex.js` - Spawn launchpad as a child process, just like PM2 is launching its own apps (needs testing).
- Temp workaround: Don't use Windows Terminal as the default terminal app (not really sustainable)