jdk/test/java/lang/ProcessBuilder/Zombies.java
changeset 27785 29d4cb4a8f5e
parent 12538 211d6e82fe51
child 39482 11b54f3b1ba7
equal deleted inserted replaced
27784:a51d6d4e0528 27785:29d4cb4a8f5e
    45         final Runtime rt = Runtime.getRuntime();
    45         final Runtime rt = Runtime.getRuntime();
    46 
    46 
    47         try {
    47         try {
    48             rt.exec("no-such-file");
    48             rt.exec("no-such-file");
    49             throw new Error("expected IOException not thrown");
    49             throw new Error("expected IOException not thrown");
    50         } catch (IOException _) {/* OK */}
    50         } catch (IOException expected) {/* OK */}
    51 
    51 
    52         try {
    52         try {
    53             rt.exec(".");
    53             rt.exec(".");
    54             throw new Error("expected IOException not thrown");
    54             throw new Error("expected IOException not thrown");
    55         } catch (IOException _) {/* OK */}
    55         } catch (IOException expected) {/* OK */}
    56 
    56 
    57         try {
    57         try {
    58             rt.exec(TrueCommand, null, new File("no-such-dir"));
    58             rt.exec(TrueCommand, null, new File("no-such-dir"));
    59             throw new Error("expected IOException not thrown");
    59             throw new Error("expected IOException not thrown");
    60         } catch (IOException _) {/* OK */}
    60         } catch (IOException expected) {/* OK */}
    61 
    61 
    62         rt.exec(TrueCommand).waitFor();
    62         rt.exec(TrueCommand).waitFor();
    63 
    63 
    64         // Count all the zombies that are children of this Java process
    64         // Count all the zombies that are children of this Java process
    65         final String[] zombieCounter = {
    65         final String[] zombieCounter = {