summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-01-05 00:09:44 +0000
committerTom Tromey <tromey@redhat.com>2005-01-05 00:09:44 +0000
commitd7abf58f4072953753bec0dd948191e56a3e024e (patch)
tree9da7d9c1e828b2b3bfdd3418159a999f04bb9c89 /vm
parenta8022e1b553cf6520e2f153706852c44e462ccfe (diff)
downloadclasspath-d7abf58f4072953753bec0dd948191e56a3e024e.tar.gz
* vm/reference/java/lang/VMProcess.java (VMProcess): Constructor
now package-private. (processThread, workList, reapedPid, reapedExitValue, state, cmd, env, dir, exception, pid, stdin, stdout, stderr, exitValue): Now package-private. (nativeSpawn, nativeReap): Likewise. * vm/reference/java/lang/VMThread.java (currentThread): Reordered modifiers. * vm/reference/java/security/VMAccessController.java (DEFAULT_CONTEXT): Reordered modifiers.
Diffstat (limited to 'vm')
-rw-r--r--vm/reference/java/lang/VMProcess.java37
-rw-r--r--vm/reference/java/lang/VMThread.java4
-rw-r--r--vm/reference/java/security/VMAccessController.java4
3 files changed, 23 insertions, 22 deletions
diff --git a/vm/reference/java/lang/VMProcess.java b/vm/reference/java/lang/VMProcess.java
index bb2dbdae6..498b605e3 100644
--- a/vm/reference/java/lang/VMProcess.java
+++ b/vm/reference/java/lang/VMProcess.java
@@ -1,5 +1,5 @@
/* java.lang.VMProcess -- VM implementation of java.lang.Process
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -73,27 +73,27 @@ final class VMProcess extends Process
private static final int TERMINATED = 2;
// Dedicated thread that does all the fork()'ing and wait()'ing.
- private static Thread processThread;
+ static Thread processThread;
// New processes waiting to be spawned by processThread.
- private static final LinkedList workList = new LinkedList();
+ static final LinkedList workList = new LinkedList();
// Return values set by nativeReap() when a child is reaped.
// These are only accessed by processThread so no locking required.
- private static long reapedPid;
- private static int reapedExitValue;
+ static long reapedPid;
+ static int reapedExitValue;
// Information about this process
- private int state; // current state of process
- private final String[] cmd; // copied from Runtime.exec()
- private final String[] env; // copied from Runtime.exec()
- private final File dir; // copied from Runtime.exec()
- private Throwable exception; // if process failed to start
- private long pid; // process id
- private OutputStream stdin; // process input stream
- private InputStream stdout; // process output stream
- private InputStream stderr; // process error stream
- private int exitValue; // process exit value
+ int state; // current state of process
+ final String[] cmd; // copied from Runtime.exec()
+ final String[] env; // copied from Runtime.exec()
+ final File dir; // copied from Runtime.exec()
+ Throwable exception; // if process failed to start
+ long pid; // process id
+ OutputStream stdin; // process input stream
+ InputStream stdout; // process output stream
+ InputStream stderr; // process error stream
+ int exitValue; // process exit value
//
// Dedicated thread that does all the fork()'ing and wait()'ing
@@ -115,7 +115,7 @@ final class VMProcess extends Process
// constructor will be private, which means the compiler will have
// to generate a second package-private constructor, which is
// bogus.
- public ProcessThread ()
+ ProcessThread ()
{
}
@@ -349,7 +349,7 @@ final class VMProcess extends Process
*
* @throws IOException if the O/S process could not be created.
*/
- private native void nativeSpawn(String[] cmd, String[] env, File dir)
+ native void nativeSpawn(String[] cmd, String[] env, File dir)
throws IOException;
/**
@@ -360,7 +360,8 @@ final class VMProcess extends Process
*
* @return true if a child was reaped, otherwise false
*/
- private static native boolean nativeReap();
+ // This is not private as it is called from an inner class.
+ static native boolean nativeReap();
/**
* Kill a process. This sends it a fatal signal but does not reap it.
diff --git a/vm/reference/java/lang/VMThread.java b/vm/reference/java/lang/VMThread.java
index bfe31ffa4..a2e0223be 100644
--- a/vm/reference/java/lang/VMThread.java
+++ b/vm/reference/java/lang/VMThread.java
@@ -1,5 +1,5 @@
/* VMThread -- VM interface for Thread of executable code
- Copyright (C) 2003, 2004 Free Software Foundation
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -345,7 +345,7 @@ final class VMThread
*
* @return the currently executing Thread
*/
- native static Thread currentThread();
+ static native Thread currentThread();
/**
* Yield to another thread. The Thread will not lose any locks it holds
diff --git a/vm/reference/java/security/VMAccessController.java b/vm/reference/java/security/VMAccessController.java
index f4adadeda..fc2410ac8 100644
--- a/vm/reference/java/security/VMAccessController.java
+++ b/vm/reference/java/security/VMAccessController.java
@@ -1,5 +1,5 @@
/* VMAccessController.java -- VM-specific access controller methods.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -70,7 +70,7 @@ final class VMAccessController
* And we return this all-permissive context to ensure that privileged
* methods called from getContext succeed.
*/
- private final static AccessControlContext DEFAULT_CONTEXT;
+ private static final AccessControlContext DEFAULT_CONTEXT;
static
{
CodeSource source = new CodeSource(null, null);