summaryrefslogtreecommitdiff
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 41a9de10f5..b853f4d593 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -1006,6 +1006,9 @@ class Popen(object):
if not self._child_created:
# We didn't get to successfully create a child process.
return
+ if self.returncode is None:
+ warnings.warn("running subprocess %r" % self, ResourceWarning,
+ source=self)
# In case the child hasn't been waited on, check if it's done.
self._internal_poll(_deadstate=_maxsize)
if self.returncode is None and _active is not None: