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

2021-03-20 Thread Gregory P. Smith
Gregory P. Smith added the comment: On POSIX the norm for anything daemonizing itself is to fork() and let the parent die so that its original process with the child pid has ended. But I'm used to this being the responsibility of the daemon process. Not the code launching the daemon.

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

2021-03-16 Thread Eryk Sun
Eryk Sun 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