summaryrefslogtreecommitdiff
path: root/Lib/asyncio/unix_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-07-14 18:36:24 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-07-14 18:36:24 +0200
commitdaded8028357890c73a067c3a10ff747a1a3036b (patch)
tree3ff42f470278302979531b68492fc07b7d67e2cc /Lib/asyncio/unix_events.py
parent56ded52fa8bda4e85d28406a53d419cf30a8cda0 (diff)
parentacdb782a83d72a823030335e8f190890ae4df9cf (diff)
downloadcpython-git-daded8028357890c73a067c3a10ff747a1a3036b.tar.gz
Merge with Python 3.4
Diffstat (limited to 'Lib/asyncio/unix_events.py')
-rw-r--r--Lib/asyncio/unix_events.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 09b875ce4c..4ba4f49cb9 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -565,7 +565,7 @@ class AbstractChildWatcher:
process 'pid' terminates. Specifying another callback for the same
process replaces the previous handler.
- Note: callback() must be thread-safe
+ Note: callback() must be thread-safe.
"""
raise NotImplementedError()
@@ -721,6 +721,9 @@ class SafeChildWatcher(BaseChildWatcher):
return
returncode = self._compute_returncode(status)
+ if self._loop.get_debug():
+ logger.debug('process %s exited with returncode %s',
+ expected_pid, returncode)
try:
callback, args = self._callbacks.pop(pid)
@@ -818,8 +821,16 @@ class FastChildWatcher(BaseChildWatcher):
if self._forks:
# It may not be registered yet.
self._zombies[pid] = returncode
+ if self._loop.get_debug():
+ logger.debug('unknown process %s exited '
+ 'with returncode %s',
+ pid, returncode)
continue
callback = None
+ else:
+ if self._loop.get_debug():
+ logger.debug('process %s exited with returncode %s',
+ pid, returncode)
if callback is None:
logger.warning(