harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4119) [classlib][luni] Reading from InputStreamReader(System.in) does not finish after closing process input stream
Date Sat, 09 Jun 2007 16:26:26 GMT
[classlib][luni] Reading from InputStreamReader(System.in) does not finish after closing process
input stream
-------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4119
                 URL: https://issues.apache.org/jira/browse/HARMONY-4119
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows/x86, harmony-jdk-r545696
            Reporter: Ivan Popov


Reading from InputStreamReader(System.in) in a child process does not finish after process
input stream is closed.

Attached test TerminateTest launches ConsoleInput class in a child JVM process, sends string
"one\ntwo\n" to its input stream, closes input stream and redirects output. ConsoleInput class
just echoes data from input stream until it is closed.

For BEA JRockit JDK this produces the following output:
------------------------------------------------------------------------------------
> %BEA_JDK%\bin\java.exe -cp . TerminateTest %BEA_JDK%\jre\bin\java.exe -cp . ConsoleInput
*** Starting process:  ...\jrockit-jdk1.5.0_06-windows-ia32\jre\bin\java.exe -cp . ConsoleInput
*** Process started
*** Streams obtained
*** Output streams redirected
*** Buffered input stream created
*** Sending input text: one
two

*** Input text sent
STDOUT: one
two

*** Close input buffered stream
*** Input buffered stream closed
STDOUT: EOF
STDOUT:

STDOUT: <close>
STDERR: <close>
------------------------------------------------------------------------------------

For Harmony JDK with DRLVM child JVM echoes a lot of empty strings after process input stream
is closed:
------------------------------------------------------------------------------------
>%HY_JDK%\bin\java.exe -cp . TerminateTest %HY_JDK%\jre\bin\java.exe -cp . ConsoleInput
*** Starting process:  ...\hdk\jdk\jre\bin\java.exe -cp . ConsoleInput
*** Process started
*** Streams obtained
*** Output streams redirected
*** Buffered input stream created
*** Sending input text: one
two

*** Input text sent
STDOUT: one
two

*** Close input buffered stream
*** Input buffered stream closed
STDOUT: one
two









STDOUT:








STDOUT:








STDOUT:
<....>
^C
------------------------------------------------------------------------------------

Child DRLVM process may remain alive and eat CPU after killing parent JVM process with ^C,
especially if parent is started with JRockit JVM.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message