|
From: Kevin B. <kb...@ca...> - 2001-11-14 17:23:15
|
Finn Bock wrote:
>
> [Kevin]
>
> >One update per week, pretty slow. :-(
>
> Don't worry about that. We have got by without it for almost 4 years
> despite frequent request for both compatible environment and system().
> It is so good to finally have both. Thanks.
My pleasure. :-)
But I just realized I should have started the stderr-reading thread
before reading stdout, so that we don't see all of stdout before seeing
any of stderr.
Sorry about that! Hopefully no more changes to this for a long time.
Here's the patch:
cvs diff -c javaos.py
Index: javaos.py
===================================================================
RCS file: /cvsroot/jython/jython/Lib/javaos.py,v
retrieving revision 2.9
diff -c -r2.9 javaos.py
*** javaos.py 2001/11/14 16:25:20 2.9
--- javaos.py 2001/11/14 17:12:35
***************
*** 219,229 ****
# _readLines( ... println )
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()
--- 219,229 ----
# _readLines( ... println )
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()
kb
|