mathworks / jupyter-matlab-proxy

MATLAB Integration for Jupyter enables you to run MATLAB code in Jupyter Notebooks and other Jupyter environments. You can also open MATLAB in a browser directly from your Jupyter environment to use more MATLAB features.
Other
279 stars 36 forks source link

Shutting kernel and jupyterlab doesn't kill MATLAB or proxy process #55

Open asfilion opened 1 year ago

asfilion commented 1 year ago

I can use the proxy with R2023a and Python 3.10 on Windows 11. When I shut down the MATLAB kernel and shut down jupyterlab, the MATLAB process and matlab-proxy-app.exe process are still active. If I reopen jupyterlab and use the proxy again, I'll get another MATLAB and proxy process. I don't see any way to shut these processes other than manually killing them in the task manager.

prabhakk-mw commented 1 year ago

Thank you @asfilion, I've been able to reproduce this issue and we are working towards a fix.

rashedmyt commented 1 year ago

Hi @asfilion

MATLAB Integration for Jupyter currently uses jupyter-server-proxy to provide both MATLAB in browser and MATLAB Kernel functionalities. Unfortunately, jupyter-server-proxy doesn't plug-in to the shutdown infrastructure provided by jupyter.

However, if you have access to the terminal from which JupyterLab is launched, you can use CTRL+C to shutdown both JupyterLab and MATLAB Integration.

There is a pending PR on jupyter-server-proxy repository which provides more access to manage the integration. For more information, please look at https://github.com/jupyterhub/jupyter-server-proxy/pull/395

Hope this helps.