cde7853d20
* testsuite/libjava.lang/Process_4.java (Process_4): Expect only a non-zero exit status from 'false'. From-SVN: r92860
21 lines
416 B
Java
21 lines
416 B
Java
// Create a process and verify failure exit code.
|
|
public class Process_4
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
try
|
|
{
|
|
Runtime r = Runtime.getRuntime();
|
|
String[] a = { "false" };
|
|
Process p = r.exec(a);
|
|
int c = p.waitFor();
|
|
// Solaris' false doesn't return 1.
|
|
System.out.println(c != 0 ? "ok" : "bad");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
System.out.println(ex.toString());
|
|
}
|
|
}
|
|
}
|