harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4119) [classlib][luni] Reading from InputStreamReader(System.in) does not finish after closing process input stream
Date Thu, 14 Jun 2007 17:54:26 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-4119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504864
] 

Mikhail Markov commented on HARMONY-4119:
-----------------------------------------

Thanks, Alexei! Applied as expected.

> [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
>            Assignee: Alexei Zakharov
>         Attachments: H-4119.patch, TerminateTest.zip
>
>
> 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