OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [Process_4.java] - Rev 781

Go to most recent revision | Compare with Previous | Blame | View Log

// 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());
      }
  }
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.