Eryk Sun <eryk...@gmail.com> added the comment:
> Didn't we clean up this warning completely on Windows recently? It > apparently matters on POSIX to join() the child process, but on > Windows you aren't going to leak any resources by just forgetting > about it, so I thought we stopped tracking them entirely. There's only a PID in POSIX, so the OS keeps a zombie process until the parent waits on it. Windows uses a handle for the process, which gets automatically closed when the Popen instance is finalized, so we don't have to explicitly wait on the process, and doing so has no bearing on the lifetime of the kernel process object. Recently, a change was made to set _active to None in Windows, so _cleanup is no longer called unnecessarily. But Victor wanted to keep the resource warning for its educational value, given some programmers might not be aware when they've left a background process running. So Popen.__del__ still issues a resource warning if returncode is None. The OP's workaround to manually set returncode works, but it's undocumented and feels like a kludge to me. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38890> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com