-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
Job keeps running after neovim exits #328
Comments
I'm experiencing the same issue... |
My hacky solution was to get the pid and run local function on_done()
local _handle = io.popen("kill " .. pid)
if _handle ~= nil then
_handle:close()
end
end
vim.api.nvim_create_autocmd("VimLeavePre", { callback = on_done }) |
Also experienced this issue, even though I called |
I've found that there is a bit of an "issue" in how luv (the system used for most shell processing in neovim) handles shutdown down running processes. I ran into some orphan issues where I would close the handle to the process but the process kept running anyway. This was in my own wrapper for libuv's My resolution was to have my shutdown function actually execute a Note, my issue was related to backgrounded processes not foreground processes, so I am not sure how applicable this is to Plenary. But it might help give an idea (for the maintainers of plenary) on how to address this kind of issue. |
I have an external program I want to run that runs forever, and very rarely prints a thing on stdout I want to handle.
This works all works fine
and starts the external process with the parent being neovim as I would expect.
However, when I quit neovim, the external process is not stopped, and it's parent has changed to 1
I'm not using the detach flag on job, so I expected the process to die when the parent process died.
I suppose I could register an autocomand to do something at vim exit (maybe? I'm just assuming there is an autocommand for that but don’t know what it is or if it exists for real), but that seems hacky. Is there another way to get this process to automatically exit when neovim itself exists?
The text was updated successfully, but these errors were encountered: