* config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_COMMON): Use floor_log2.
[official-gcc.git] / libjava / testsuite / libjava.lang / Process_5.java
blob61fd5b7409f9049a731bbe124f894c9baf93b301
1 // Create a long running process and verify that the exitValue is not
2 // immediately available. Then destroy() it and verify that it
3 // terminates quickly with a non-zero exitValue.
4 public class Process_5
6 public static void main(String[] args)
8 try
10 int c;
11 long startTime = System.currentTimeMillis();
12 Runtime r = Runtime.getRuntime();
13 String[] a = { "sleep", "120" };
14 Process p = r.exec(a);
16 try
18 c = p.exitValue();
19 System.out.println("bad 1");
20 return;
22 catch (IllegalThreadStateException itse)
24 // Ignore as this is good here.
27 p.destroy();
29 c = p.waitFor();
31 long endTime = System.currentTimeMillis();
33 if (endTime - startTime > 110000L)
34 System.out.println("bad 2");
36 System.out.println(c != 0 ? "ok" : "bad 3");
38 catch (Exception ex)
40 System.out.println(ex.toString());