[issue38890] subprocess.Popen should not emit a ResourceWarning for a detached process

Eryk Sun report at bugs.python.org
Wed Mar 17 00:59:05 EDT 2021


Eryk Sun <eryksun at gmail.com> added the comment:

I wonder if this should be handled more productively by supporting a `daemon` parameter. In POSIX, use the double fork technique for creating a daemon process. In Windows, use DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_BREAKAWAY_FROM_JOB. For a daemon process, the finalizer would not emit a resource warning or add it to the _active list.

----------
title: A subprocess.Popen created with creationFlags=DETACHED_PROCESS on Windows should not emit a ResourceWarning -> subprocess.Popen should not emit a ResourceWarning for a detached process
versions: +Python 3.10 -Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38890>
_______________________________________


More information about the Python-bugs-list mailing list