JupyterLab doesn't kill python process (PID) after shutdown?

Hi, I’m guessing this may not be a bug so hopefully this is an appropriate place to ask this question. I’m on Ubuntu 20.04 and use JL via MiniConda. JupyterLab runs great and I love using it. :slight_smile:

My question is as follows, in terms of processes (PID).

When I launch JL, I can see two PID created by using a command like ps -ef | grep python:

  1. one that seems to be more of a parent, and never shows up in top
  2. another one that has the above PID as it’s parent PPID, and when I run code in the notebook it does show up in top as command python

If I restart the kernel, the 2) process above will be killed, and a new one is created from the same parent PPID.

All well and good. When I then do File->Shutdown (ie, “Do you want to shutdown JupyterLab”), the first process is then killed (no longer shows up in the ps command), but the second process is not killed. It still shows up in the ps command. It never shows up in top anymore, and I suspect it may not be taking up any resources?

So I’m just wondering: is this by design, for some reason, and does it really matter?

Thank you for satisfying my curiosity! (I did try to Google this, but couldn’t find anything that was asking this specific question)