Review request: JDK-7147084 (process) appA hangs when read output stream of appB which starts appC that runs forever

Alexey Utkin alexey.utkin at oracle.com
Mon May 13 14:44:36 UTC 2013


Thanks, Martin!

You are right. The approach

     private static String JAVA_EXE = System.getProperty("java.home")
         + File.separator + "bin"
         + File.separator + "java";

     private static String[] getCommandArray(String processName) {
         String[] cmdArray = {
             JAVA_EXE,
             "-cp",
             System.getProperty("java.class.path"),
             InheritIOEHandle.class.getName(),
             processName
         };
         return cmdArray;
     }

is better. There is one more problem with raise-condition for the file 
handles. In current edition there is delta when the file handle could be 
inherited by the concurrent process. That is not fatal for read/write, 
but not good for delete. Synchronized call does not cover the file.close 
in finalized block.

I will prepare new edition soon.

Regards,
-uta



On 5/8/2013 10:20 PM, Martin Buchholz wrote:
> Alexey,
> Thanks for working on the scary windows process stuff.
> I only have time for superficial review.
> It looks like you know what you're doing.
>
> +        String[] cmdArray = {
> +            "java",
> +            "-cp",
> This looks like it's invoking whatever "java" is on the path.  But 
> there's no guarantee there is such a java, or that it's the right one. 
>  Consider invoking the java we're in, as in other jtreg tests like 
> IIRC ProcessBuilder/Basic.java




More information about the core-libs-dev mailing list