cpython/Lib/asyncio
Victor Stinner 47cd10d7a9 asyncio: sync with Tulip
Issue #23347: send_signal(), kill() and terminate() methods of
BaseSubprocessTransport now check if the transport was closed and if the
process exited.

Issue #23347: Refactor creation of subprocess transports. Changes on
BaseSubprocessTransport:

* Add a wait() method to wait until the child process exit
* The constructor now accepts an optional waiter parameter. The _post_init()
  coroutine must not be called explicitly anymore. It makes subprocess
  transports closer to other transports, and it gives more freedom if we want
  later to change completly how subprocess transports are created.
* close() now kills the process instead of kindly terminate it: the child
  process may ignore SIGTERM and continue to run. Call explicitly terminate()
  and wait() if you want to kindly terminate the child process.
* close() now logs a warning in debug mode if the process is still running and
  needs to be killed
* _make_subprocess_transport() is now fully asynchronous again: if the creation
  of the transport failed, wait asynchronously for the process eixt. Before the
  wait was synchronous. This change requires close() to *kill*, and not
  terminate, the child process.
* Remove the _kill_wait() method, replaced with a more agressive close()
  method. It fixes _make_subprocess_transport() on error.
  BaseSubprocessTransport.close() calls the close() method of pipe transports,
  whereas _kill_wait() closed directly pipes of the subprocess.Popen object
  without unregistering file descriptors from the selector (which caused severe
  bugs).

These changes simplifies the code of subprocess.py.
2015-01-30 00:05:19 +01:00
..
__init__.py Issue #23046: Expose the BaseEventLoop class in the asyncio namespace 2015-01-06 01:03:58 +01:00
base_events.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
base_subprocess.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
constants.py asyncio: Pause accepting whenever accept() returns certain errors. Fixes asyncio issue #78. 2013-11-01 14:12:50 -07:00
coroutines.py asyncio: Truncate to 80 columns 2015-01-09 00:09:10 +01:00
events.py Issue #23074: asyncio.get_event_loop() now raises an exception if the thread 2014-12-18 01:20:10 +01:00
futures.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
locks.py Issue #22369: Change "context manager protocol" to "context management protocol". 2014-09-10 23:43:41 +03:00
log.py
proactor_events.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
protocols.py asyncio doc: document Protocol state machine 2015-01-29 13:33:15 +01:00
queues.py asyncio: sync with Tulip 2015-01-09 01:42:52 +01:00
selector_events.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
sslproto.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00
streams.py Backout changeset 6ab2575bc12b 2015-01-15 21:50:19 +01:00
subprocess.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
tasks.py asyncio: sync with Tulip 2015-01-29 14:15:19 +01:00
test_utils.py asyncio: sync with Tulip 2015-01-15 00:04:21 +01:00
transports.py asyncio: Move loop attribute to _FlowControlMixin 2014-11-05 15:27:41 +01:00
unix_events.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
windows_events.py asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
windows_utils.py Issue #23243, asyncio: Emit a ResourceWarning when an event loop or a transport 2015-01-29 17:50:58 +01:00