Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Trashing terminal window running Tye does not gracefully shut down Tye #26

Closed
philliphoff opened this issue Jan 15, 2021 · 3 comments · Fixed by #62
Closed

Trashing terminal window running Tye does not gracefully shut down Tye #26

philliphoff opened this issue Jan 15, 2021 · 3 comments · Fixed by #62
Labels
bug Something isn't working external P2

Comments

@philliphoff
Copy link
Member

On Windows, "trashing" the terminal window running Tye does not cause Tye to shutdown gracefully. Whereas, on Mac, it does. This seems related to our use of process.kill() when the user trashes the terminal window, where Windows doesn't support the default SIGTERM signal and so just unconditionally kills the process, resulting in orphaned service processes.

Ideally, the user would have a nicer UX for stopping (debugging) Tye, and not need to trash the terminal window to close Tye; there is an open issue in Tye to allow that. Until that happens, we should find a workaround for Windows.

@philliphoff philliphoff added the bug Something isn't working label Jan 15, 2021
@philliphoff
Copy link
Member Author

Consider adding ability for commandTaskProvider-derived types to specify whether to use a non-standard kill() signal (e.g. SIGTERM is the default but, for tye run on Windows, use SIGINT instead as that should be supported and should be the equivalent of Ctrl+C).

@philliphoff
Copy link
Member Author

So neither SIGINT nor SIGBREAK are supported as well, making it nigh impossible to signal the process (at the process level) to shutdown gracefully. As a mitigation, one case use taskkill /pid <pid> /f /t to at least help ensure that any sub-processes are killed (which help in the Tye case).

This is more evidence for a non-process-level means to shutdown a Tye application (such as via a control plane).

@philliphoff
Copy link
Member Author

I have no idea whether this would eventually help, but it seems like a step in the right direction.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working external P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants