id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	branch	branch_author	launchpad_bug
4352	twisted.test.test_process.ProcessTestCase.testStdio and pollreactor don't get along	exarkun		"If the helper program used by `testStdio` is changed to use pollreactor:

{{{
Index: twisted/test/process_twisted.py
===================================================================
--- twisted/test/process_twisted.py     (revision 28664)
+++ twisted/test/process_twisted.py     (working copy)
@@ -10,6 +10,8 @@
 sys.path.insert(0, os.curdir)
 ### end of preamble
 
+from twisted.internet import pollreactor
+pollreactor.install()
 
 from twisted.python import log
 from zope.interface import implements
}}}

then the test fails:

{{{
===============================================================================
[FAIL]: twisted.test.test_process.ProcessTestCase.testStdio

Traceback (most recent call last):
  File ""/home/exarkun/Projects/Twisted/trunk/twisted/test/test_process.py"", line 501, in processEnded
    ""%s\n"" % (p.outF.getvalue(), p.errF.getvalue()))
twisted.trial.unittest.FailTest: Output follows:

Error message from process_twisted follows:
2010-03-05 22:46:52-0500 [-] Log opened.
2010-03-05 22:46:52-0500 [-] connection made
2010-03-05 22:46:52-0500 [-] connectionLost [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion.
2010-03-05 22:46:52-0500 [-] ]
2010-03-05 22:46:52-0500 [-] Main loop terminated.


not equal:
a = ''
b = 'hello, worldabc123'

-------------------------------------------------------------------------------
}}}

The child receives the bytes written to it, but apparently it shuts down the reactor too quickly and the parent process never receives the results.

I'm not sure if this is just a test bug or if it's actually a misbehavior of the reactor.  The failing test is blocking #2234, though, which aims to make poll the default reactor on some platforms.
"	defect	closed	normal		core	fixed		jknight	branches/poll-stdio-halfclose-4352	exarkun	
