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

choosenim causes child nimsuggest processes not to be killed on server shutdown, when using nimlangserver #339

Open
nickysn opened this issue Feb 29, 2024 · 1 comment

Comments

@nickysn
Copy link

nickysn commented Feb 29, 2024

Here's the original issue, reported in the nimlangserver:

nim-lang/langserver#184

It turned out this issue only occurs when choosenim is used. When nimlangserver is shut down, it sends SIGTERM signals to its nimsuggest child processes. Since choosenim inserts a proxy process between the real nimsuggest and nimlangserver, when the server is shut down, only the proxy is killed, leaving the real nimsuggest processes running and consuming memory.

I think the choosenim proxy should be modified in such a way, so that it doesn't leave processes running, when it's killed. One way to do it is to handle the SIGTERM signal (and the equivalent on Windows). Another possible solution is to use the execve() family of functions to spawn the real nimsuggest process, thus replacing the proxy process with the real nimsuggest, using the same process id.

@dunric
Copy link

dunric commented Apr 25, 2024

*bump*

Same issue here. Anyone already addressing the solution?

I now have to work around this problem with expose real nim executables from choosenim toolchains path in PATH environment variable.

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

No branches or pull requests

2 participants