You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/06/15 10:39:26 UTC

[jira] Closed: (HARMONY-4119) [classlib][luni] Reading from InputStreamReader(System.in) does not finish after closing process input stream

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

Alexei Zakharov closed HARMONY-4119.
------------------------------------


Was verified by Mikhail.

> [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.