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] - Blame information for rev 781

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

Line No. Rev Author Line
1 765 jeremybenn
// Create a process and verify failure exit code.
2
public class Process_4
3
{
4
  public static void main(String[] args)
5
  {
6
    try
7
      {
8
        Runtime r = Runtime.getRuntime();
9
        String[] a = { "false" };
10
        Process p = r.exec(a);
11
        int c = p.waitFor();
12
        // Solaris' false doesn't return 1.
13
        System.out.println(c != 0 ? "ok" : "bad");
14
      }
15
    catch (Exception ex)
16
      {
17
        System.out.println(ex.toString());
18
      }
19
  }
20
}

powered by: WebSVN 2.1.0

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