foreshadow / atom-python-run

A simple atom package. Press one key to run your python code in atom.
https://atom.io/packages/atom-python-run
MIT License
43 stars 32 forks source link

Leaves background python processes running #110

Open yobson1 opened 5 years ago

yobson1 commented 5 years ago

After running a python script using this package it sometimes leaves a background python process running that always uses about 9% CPU. I tried re-installing the package and re-installing python. Neither solved the issue.

Here is what I see in task manager: https://i.imgur.com/8zdfU0m.png

Sometimes this can be several background processes, as it will sometimes create the process and sometimes it wont, so if I have ran the file a few times there could be several.

foreshadow commented 5 years ago

Known issue. 25% CPU for me. This problem have lasted long and I cannot fix it. Need help. One naive solution is to manually run taskkill after using atom.

foreshadow commented 5 years ago

And I wonder if all users are experiencing this, because this problem bothered me about two years and this is the first issue reporting this. Add +1 to the first comment if you do.

jonascj commented 4 years ago

I have many a student who is experiencing a similar thing with IDLE on Windows. I know this is not related to IDLE at all, I just wanted to mention that it seems even the IDLE-devs can not get Windows to close the launched python process.

I've never looked at the task manager on my student's computers, but if they use IDLE's F5-to-run functionality to launch a Flask application like the one below, they can only run it once because the second time the port is reported to already be in use. That to me sounds like the python process launched is not killed.

if __name__ == "__main__":
    app.run(0.0.0.0, port=5000)