[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 28397ecf2316 by Charles-François Natali in branch 'default': Issue #19310: asyncio: fix child processes reaping logic. http://hg.python.org/cpython/rev/28397ecf2316 -- nosy: +python-dev ___ Python tracker

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Guido van Rossum
Guido van Rossum added the comment: CF, feel free to commit this fix too. --Guido van Rossum (sent from Android phone) On Oct 20, 2013 1:05 PM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > Sorry, scratch that. add_signal_handler() won't even accept being called > from a no

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sorry, scratch that. add_signal_handler() won't even accept being called from a non-main thread, according to the comments. -- ___ Python tracker _

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Unrelated, but transp._process_exited will be called from the main thread even if the loop is running from another thread. Shouldn't call_soon_threadsafe be used here? -- nosy: +pitrou ___ Python tracker

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Guido van Rossum
Guido van Rossum added the comment: Ah, sorry, I didn't see this before reviewing your other change to the same code. Your 2nd bullet is http://code.google.com/p/tulip/issues/detail?id=68 -- ___ Python tracker __

[issue19310] asyncio: fix waitpid() logic

2013-10-20 Thread Charles-François Natali
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