New submission from Charles-François Natali:

The current SIGCHILD handler has two bugs:
- it reschedules itself if waitpid() returns 0: so if this ever happens, it 
will enter a busy-loop until all children have exited
- it doesn't reschedule itself if waitpid() succeeds in reaping a child: since 
signals can be coalesced, we must keep calling waitpid() as long as it 
succeeds, since the incoming SIGCHLD signal could actually be due to more than 
one child exited (and there won't be a SIGCHILD coming later for the processes 
we didn't wait right away).

----------
components: Library (Lib)
files: asyncio_waitpid_loop.diff
keywords: needs review, patch
messages: 200561
nosy: gvanrossum, neologix
priority: normal
severity: normal
stage: patch review
status: open
title: asyncio: fix waitpid() logic
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file32242/asyncio_waitpid_loop.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19310>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to