mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
Issue #28368: Refuse monitoring processes if the child watcher has no loop attached.
Patch by Vincent Michel.
This commit is contained in:
parent
b5bb404cca
commit
9eb6c67776
4 changed files with 42 additions and 6 deletions
|
|
@ -433,6 +433,13 @@ def kill_running():
|
|||
# the transport was not notified yet
|
||||
self.assertFalse(killed)
|
||||
|
||||
# Unlike SafeChildWatcher, FastChildWatcher does not pop the
|
||||
# callbacks if waitpid() is called elsewhere. Let's clear them
|
||||
# manually to avoid a warning when the watcher is detached.
|
||||
if sys.platform != 'win32' and \
|
||||
isinstance(self, SubprocessFastWatcherTests):
|
||||
asyncio.get_child_watcher()._callbacks.clear()
|
||||
|
||||
def test_popen_error(self):
|
||||
# Issue #24763: check that the subprocess transport is closed
|
||||
# when BaseSubprocessTransport fails
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue