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

Bugfix - Windows: Textmate node process doesn't close when Oni2 closes #445

Merged
merged 4 commits into from
Jul 16, 2019

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jul 16, 2019

Issue: Oni 2, today, spins up a node process for running syntax highlighting:
image

Even once we have a native highlighting solution via #161 , we'll still have a node process for the extension host.

On Windows, child processes aren't stopped by default if the parent process is closed. Therefore, on Windows, when you close Oni2, you get left with a node.exe process still running.

Fix: Adapt the same solution used by VSCode's extension host: https://github.com/microsoft/vscode/blob/03a9aca859485979f20b9f037587310aced33eab/src/bootstrap-fork.js#L34 - check periodically if the parent is active, and if it is not, close the process. On the Reason side, we just need to send the parent's PID over to the process via an environment variable.

@bryphe bryphe merged commit 3d41e03 into master Jul 16, 2019
@bryphe bryphe deleted the bugfix/textmate-client-stop-after-close branch July 16, 2019 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant