soravux / scoop

SCOOP (Scalable COncurrent Operations in Python)
https://github.com/soravux/scoop
GNU Lesser General Public License v3.0
636 stars 87 forks source link

Add sys.exit call at end of scoop/bootstrap/__main__.py #73

Closed nerdynucleon closed 6 years ago

nerdynucleon commented 6 years ago

If a Popen.terminate() is called without setting an exit code a resource warning is displayed. Reproducible on Python >3.6

subprocess.py:766: ResourceWarning: subprocess <PID> is still running
  ResourceWarning, source=self)
nerdynucleon commented 6 years ago

This is not the right solution to avoid a resource warning.

The correct solution is to add a process.wait() call after calling process.terminate() in workerLaunch.py. This ensures that a return code will be set by the time the subprocess del method is executed.