Update of /cvsroot/jython/jython/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv9736
Modified Files:
javaos.py
Log Message:
_ShellEnv.system(): Start the stderr-reading thread before reading
stdout, so that we don't see all of stdout before seeing any of stderr.
Patch from Kevin.
Index: javaos.py
===================================================================
RCS file: /cvsroot/jython/jython/Lib/javaos.py,v
retrieving revision 2.9
retrieving revision 2.10
diff -C2 -d -r2.9 -r2.10
*** javaos.py 2001/11/14 16:25:20 2.9
--- javaos.py 2001/11/14 17:57:26 2.10
***************
*** 220,228 ****
def println( arg, write=sys.stdout.write ):
write( arg + "\n" )
- # read stdin in main thread
- self._readLines( p.getInputStream(), println )
# read stderr in secondary thread
thread.start_new_thread( self._readLines,
( p.getErrorStream(), println ))
return p.waitFor()
--- 220,228 ----
def println( arg, write=sys.stdout.write ):
write( arg + "\n" )
# read stderr in secondary thread
thread.start_new_thread( self._readLines,
( p.getErrorStream(), println ))
+ # read stdin in main thread
+ self._readLines( p.getInputStream(), println )
return p.waitFor()
|