You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I noticed that when I directly close the frontend program that called "jupyter-console" (e.g. my terminal), it leaves the "python -m ipykernel_launcher -f ~/.local/share/jupyter/runtime/kernel-PID.json" running in the background. I would like to kill the kernel session created by "jupyter-console" whenever its host frontend program is killed / closed. Is there any option or configuration where I can achieve that? Thank you!
The text was updated successfully, but these errors were encountered:
I think I have some clues as to the reason why. First to provide some of the relevant observations:
On a remote machine without interactive login session, killing the parent frontend (e.g. a Tmux session or terminal) hosting the Jupyter console will lead to the expected killing of ipykernel on the background.
On another machine running Manjaro Gnome, killing the parent frontend (e.g. a Tmux session or terminal) will not kill the ipykernel subprocess. I can see that it's still dangling in the background.
Chasing down the rabbit hole, I found additional observations:
"ipykernel/parentpoller.py" : is responsible for continuous monitoring of parent process that spawned ipykernel. "Line 36" makes the assumption that if the parent of orphaned process is killed, its ID gets set to "1", in which case the kernel will exit itself.
After adding in a line to log the parent process ID, I found that on the Manjaro Gnome machine, the initial parent process ID transfers from the "jupyer-console":
after killing the initial parent process to:
A few additional posts suggest that the parent ID of orphaned processes may not be necessarily set to 1 if there are ancestor processes. I will also raise this issue separately on the "ipykernel".
Hi, I noticed that when I directly close the frontend program that called "jupyter-console" (e.g. my terminal), it leaves the "python -m ipykernel_launcher -f ~/.local/share/jupyter/runtime/kernel-PID.json" running in the background. I would like to kill the kernel session created by "jupyter-console" whenever its host frontend program is killed / closed. Is there any option or configuration where I can achieve that? Thank you!
The text was updated successfully, but these errors were encountered: