[kaffe] CVS kaffe (robilad): removed unused org.kaffe.lang.UNIXProcess class

Kaffe CVS cvs-commits at kaffe.org
Sun Jul 16 18:03:38 PDT 2006


PatchSet 7362 
Date: 2006/07/17 00:50:10
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
removed unused org.kaffe.lang.UNIXProcess class

2006-07-17  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/vmspecific/org/kaffe/lang/UNIXProcess.java:
        Removed.

        * test/regression/ProcessTest.java,
        test/regression/KaffeInternal.java:
        Removed references to org.kaffe.lang.UNIXProcess.

        * libraries/clib/native/ClassLoader.c: (java_lang_VMClassLoader_loadClass)
        Don't prohibit loading of org.kaffe.lang classes any more, as there are
        no classes left in that package.

        * include/Makefile.am (NOINSTALL_JNI_DERIVED_HDRS): Removed
        org_kaffe_lang_UNIXProcess.h.

Members: 
	ChangeLog:1.4866->1.4867 
	include/Makefile.am:1.129->1.130 
	include/Makefile.in:1.286->1.287 
	libraries/clib/native/ClassLoader.c:1.53->1.54 
	libraries/javalib/Makefile.am:1.447->1.448 
	libraries/javalib/Makefile.in:1.561->1.562 
	libraries/javalib/vmspecific/org/kaffe/lang/UNIXProcess.java:1.1->1.2(DEAD) 
	test/regression/KaffeInternal.java:1.5->1.6 
	test/regression/ProcessTest.java:1.3->1.4 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4866 kaffe/ChangeLog:1.4867
--- kaffe/ChangeLog:1.4866	Sun Jul 16 23:54:17 2006
+++ kaffe/ChangeLog	Mon Jul 17 00:50:10 2006
@@ -1,5 +1,21 @@
 2006-07-17  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/vmspecific/org/kaffe/lang/UNIXProcess.java:
+	Removed.
+
+	* test/regression/ProcessTest.java, 
+	test/regression/KaffeInternal.java:
+	Removed references to org.kaffe.lang.UNIXProcess.
+
+	* libraries/clib/native/ClassLoader.c: (java_lang_VMClassLoader_loadClass)
+	Don't prohibit loading of org.kaffe.lang classes any more, as there are
+	no classes left in that package. 
+
+	* include/Makefile.am (NOINSTALL_JNI_DERIVED_HDRS): Removed 
+	org_kaffe_lang_UNIXProcess.h.
+
+2006-07-17  Dalibor Topic  <robilad at kaffe.org>
+
 	* test/regression/KaffeInternal.java:
 	Use org.kaffe.lang.UNIXProcess for the test.
 
Index: kaffe/include/Makefile.am
diff -u kaffe/include/Makefile.am:1.129 kaffe/include/Makefile.am:1.130
--- kaffe/include/Makefile.am:1.129	Sun Jul 16 22:54:56 2006
+++ kaffe/include/Makefile.am	Mon Jul 17 00:50:13 2006
@@ -133,7 +133,6 @@
 	java_lang_VMSystem.h \
 	java_nio_VMDirectByteBuffer.h \
 	java_nio_MappedByteBufferImpl.h \
-	org_kaffe_lang_UNIXProcess.h \
 	org_kaffe_management_JIT.h \
 	org_kaffe_management_Debug.h \
 	org_kaffe_management_XProfiler.h \
Index: kaffe/include/Makefile.in
diff -u kaffe/include/Makefile.in:1.286 kaffe/include/Makefile.in:1.287
--- kaffe/include/Makefile.in:1.286	Sun Jul 16 22:54:57 2006
+++ kaffe/include/Makefile.in	Mon Jul 17 00:50:13 2006
@@ -473,7 +473,6 @@
 	java_lang_VMSystem.h \
 	java_nio_VMDirectByteBuffer.h \
 	java_nio_MappedByteBufferImpl.h \
-	org_kaffe_lang_UNIXProcess.h \
 	org_kaffe_management_JIT.h \
 	org_kaffe_management_Debug.h \
 	org_kaffe_management_XProfiler.h \
Index: kaffe/libraries/clib/native/ClassLoader.c
diff -u kaffe/libraries/clib/native/ClassLoader.c:1.53 kaffe/libraries/clib/native/ClassLoader.c:1.54
--- kaffe/libraries/clib/native/ClassLoader.c:1.53	Sat Apr 22 01:53:42 2006
+++ kaffe/libraries/clib/native/ClassLoader.c	Mon Jul 17 00:50:16 2006
@@ -210,7 +210,6 @@
 	  classname2pathname(name, name);
 
 	if (foundSlash ||
-	    !strncmp (name, "org/kaffe/lang/", 11) ||
 	    (!strncmp (name, "gnu/classpath/", 14)
              && strncmp (name, 
                          "gnu/classpath/tools/", 
Index: kaffe/libraries/javalib/Makefile.am
diff -u kaffe/libraries/javalib/Makefile.am:1.447 kaffe/libraries/javalib/Makefile.am:1.448
--- kaffe/libraries/javalib/Makefile.am:1.447	Sun Jul 16 23:54:20 2006
+++ kaffe/libraries/javalib/Makefile.am	Mon Jul 17 00:50:16 2006
@@ -277,7 +277,6 @@
 	vmspecific/java/util/zip/ZipOutputStream.java \
 	vmspecific/org/kaffe/jar/ExecJar.java \
 	vmspecific/org/kaffe/jar/ExecJarName.java \
-	vmspecific/org/kaffe/lang/UNIXProcess.java \
 	vmspecific/org/kaffe/management/Classpath.java \
 	vmspecific/org/kaffe/management/Debug.java \
 	vmspecific/org/kaffe/management/JIT.java \
Index: kaffe/libraries/javalib/Makefile.in
diff -u kaffe/libraries/javalib/Makefile.in:1.561 kaffe/libraries/javalib/Makefile.in:1.562
--- kaffe/libraries/javalib/Makefile.in:1.561	Sun Jul 16 23:54:23 2006
+++ kaffe/libraries/javalib/Makefile.in	Mon Jul 17 00:50:17 2006
@@ -590,7 +590,6 @@
 	vmspecific/java/util/zip/ZipOutputStream.java \
 	vmspecific/org/kaffe/jar/ExecJar.java \
 	vmspecific/org/kaffe/jar/ExecJarName.java \
-	vmspecific/org/kaffe/lang/UNIXProcess.java \
 	vmspecific/org/kaffe/management/Classpath.java \
 	vmspecific/org/kaffe/management/Debug.java \
 	vmspecific/org/kaffe/management/JIT.java \
@@ -936,7 +935,7 @@
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/vmspecific/META-INF $(distdir)/vmspecific/gnu/bytecodecvssnap $(distdir)/vmspecific/gnu/classpath $(distdir)/vmspecific/gnu/classpath/jdwp $(distdir)/vmspecific/gnu/getopt $(distdir)/vmspecific/gnu/inet/comsat $(distdir)/vmspecific/gnu/inet/finger $(distdir)/vmspecific/gnu/inet/gopher $(distdir)/vmspecific/gnu/inet/imap $(distdir)/vmspecific/gnu/inet/ldap $(distdir)/vmspecific/gnu/inet/nntp $(distdir)/vmspecific/gnu/inet/pop3 $(distdir)/vmspecific/gnu/inet/smtp $(distdir)/vmspecific/gnu/inet/util $(distdir)/vmspecific/gnu/java/lang $(distdir)/vmspecific/gnu/java/lang/management $(distdir)/vmspecific/gnu/java/net $(distdir)/vmspecific/gnu/java/nio $(distdir)/vmspecific/java/io $(distdir)/vmspecific/java/lang $(distdir)/vmspecific/java/lang/management $(distdir)/vmspecific/java/lang/ref $(distdir)/vmspecific/java/lang/reflect $(distdir)/vmspecific/java/net $(distdir)/vmspecific/java/nio $(distdir)/vmspecific/java/nio/channels $(distdir)/vmspecific/java/security $(distdir)/vmspecific/java/util $(distdir)/vmspecific/java/util/mime $(distdir)/vmspecific/java/util/zip $(distdir)/vmspecific/org/kaffe/jar $(distdir)/vmspecific/org/kaffe/lang $(distdir)/vmspecific/org/kaffe/management $(distdir)/vmspecific/org/kaffe/security $(distdir)/vmspecific/org/kaffe/security/provider $(distdir)/vmspecific/org/kaffe/util $(distdir)/vmspecific/org/kaffe/util/zip $(distdir)/vmspecific/org/objectweb/asm153 $(distdir)/vmspecific/org/xbill/DNS $(distdir)/vmspecific/org/xbill/DNS/security $(distdir)/vmspecific/org/xbill/DNS/utils
+	$(mkdir_p) $(distdir)/vmspecific/META-INF $(distdir)/vmspecific/gnu/bytecodecvssnap $(distdir)/vmspecific/gnu/classpath $(distdir)/vmspecific/gnu/classpath/jdwp $(distdir)/vmspecific/gnu/getopt $(distdir)/vmspecific/gnu/inet/comsat $(distdir)/vmspecific/gnu/inet/finger $(distdir)/vmspecific/gnu/inet/gopher $(distdir)/vmspecific/gnu/inet/imap $(distdir)/vmspecific/gnu/inet/ldap $(distdir)/vmspecific/gnu/inet/nntp $(distdir)/vmspecific/gnu/inet/pop3 $(distdir)/vmspecific/gnu/inet/smtp $(distdir)/vmspecific/gnu/inet/util $(distdir)/vmspecific/gnu/java/lang $(distdir)/vmspecific/gnu/java/lang/management $(distdir)/vmspecific/gnu/java/net $(distdir)/vmspecific/gnu/java/nio $(distdir)/vmspecific/java/io $(distdir)/vmspecific/java/lang $(distdir)/vmspecific/java/lang/management $(distdir)/vmspecific/java/lang/ref $(distdir)/vmspecific/java/lang/reflect $(distdir)/vmspecific/java/net $(distdir)/vmspecific/java/nio $(distdir)/vmspecific/java/nio/channels $(distdir)/vmspecific/java/security $(distdir)/vmspecific/java/util $(distdir)/vmspecific/java/util/mime $(distdir)/vmspecific/java/util/zip $(distdir)/vmspecific/org/kaffe/jar $(distdir)/vmspecific/org/kaffe/management $(distdir)/vmspecific/org/kaffe/security $(distdir)/vmspecific/org/kaffe/security/provider $(distdir)/vmspecific/org/kaffe/util $(distdir)/vmspecific/org/kaffe/util/zip $(distdir)/vmspecific/org/objectweb/asm153 $(distdir)/vmspecific/org/xbill/DNS $(distdir)/vmspecific/org/xbill/DNS/security $(distdir)/vmspecific/org/xbill/DNS/utils
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
 	list='$(DISTFILES)'; for file in $$list; do \
===================================================================
Checking out kaffe/libraries/javalib/vmspecific/org/kaffe/lang/UNIXProcess.java
RCS:  /home/cvs/kaffe/kaffe/libraries/javalib/vmspecific/org/kaffe/lang/Attic/UNIXProcess.java,v
VERS: 1.1
***************
--- kaffe/libraries/javalib/vmspecific/org/kaffe/lang/UNIXProcess.java	Mon Jul 17 01:03:37 2006
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,217 +0,0 @@
-
-/*
- * Java core library component.
- *
- * Copyright (c) 1997, 1998
- *      Transvirtual Technologies, Inc.  All rights reserved.
- *
- * Copyright (c) 2004
- *      The Kaffe.org's developers.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- */
-
-package org.kaffe.lang;
-
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import gnu.java.nio.channels.FileChannelImpl;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class UNIXProcess extends Process {
-	boolean isalive;
-	int exit_code;
-	FileDescriptor stdin_fd;
-	FileDescriptor stdout_fd;
-	FileDescriptor stderr_fd;
-	FileDescriptor sync_fd;
-	int pid;
-	OutputStream stdin_stream;
-	InputStream raw_stdout;
-	InputStream raw_stderr;
-	FileOutputStream sync;
-	Throwable throwable;		// saved to rethrow in correct thread
-
-public UNIXProcess(final String argv[], final String arge[], File dir)
-		throws Throwable {
-	
-	/*
-	 * Use supplied directory, or current directory if null
-	 */
-	final String dirPath = (dir != null) ? dir.toString() : ".";
-
-	/* We first create a thread to start the new process in.  This
-	 * is because on some system we can only wait for the child from
-	 * it's parent (UNIX for example).  So, we have to create a thread
-	 * to do the waiting.
-	 */
-	Thread sitter = new Thread() {
-		public void run() {
-			int fae = 0;
-			try {
-				fae = forkAndExec(argv, arge, dirPath);
-			}
-			catch (Throwable t) {
-				// save it to rethrow in correct thread
-				throwable = t;
-				synchronized(this) {
-					this.notify();
-				}
-				return;
-			}
-			if (fae == 0) {
-				synchronized(this) {
-					isalive = true;
-					this.notify();
-				}
-				exit_code = execWait();
-			}
-			synchronized(this) {
-				isalive = false;
-				this.notifyAll();
-			}
-			synchronized(UNIXProcess.this) {
-				try_close(sync);
-				UNIXProcess.this.notifyAll();
-			}
-		}
-	};
-
-	/* Start the sitter then wait until it says it's child has started.
-	 * We then retrieve the childs connection information.
-	 */
-	synchronized(sitter) {
-		sitter.start();
-		try {
-			sitter.wait();
-		}
-		catch (InterruptedException _) {
-		}
-		if (throwable != null) {
-			// rethrow in current thread
-			try {
-				/* Try to chain the exceptions.
-				 * The exception we want to chain may already
-				 * have its cause set, so we need a fresh instance
-				 * to work on.
-				 */
-				Throwable throw_me = (Throwable) throwable.getClass().newInstance();
-				throw_me.initCause(throwable);
-				throw throw_me;
-			}
-			catch (InstantiationException e) {
-				throw throwable.fillInStackTrace();
-			}
-			catch (IllegalAccessException e) {
-				throw throwable.fillInStackTrace();
-			}
-		}
-
-		// Create streams from the file descriptors
-		stdin_stream = new FileOutputStream(stdin_fd);
-		raw_stdout = new FileInputStream(stdout_fd);
-		raw_stderr = new FileInputStream(stderr_fd);
-
-		// now signal child to proceed
-		sync = new FileOutputStream(sync_fd);
-		byte[] sbuf = new byte[1];
-		try {
-			sync.write(sbuf);
-		}
-		catch (IOException _) {
-		}
-	}
-}
-
-public int exitValue() {
-	if (isalive) {
-		throw new IllegalThreadStateException();
-	}
-	return exit_code;
-}
-
-public InputStream getErrorStream() {
-	return raw_stderr;
-}
-
-public InputStream getInputStream() {
-	return raw_stdout;
-}
-
-public OutputStream getOutputStream() {
-	return stdin_stream;
-}
-
-public int getPID() {
-	return pid;
-}
-
-public int waitFor() throws InterruptedException {
-	synchronized(this) {
-		while (isalive) {
-			wait();
-		}
-	}
-	return (exit_code);
-}
-
-public void destroy() {
-	sendSignal(getKillSignal());
-	try {
-		raw_stdout.close();
-		raw_stderr.close();
-		stdin_stream.close();
-		sync.close();
-	}
-	catch (IOException e) {
-		e.printStackTrace();
-	}
-}
-
-public void sendSignal(int signum) {
-	if (!isalive)
-		return;
-	sendSignal(pid, signum);
-}
-
-public static void sendSignal(int pid, int signum) {
-	sendSignal0(pid, signum);
-}
-
-private native int forkAndExec(Object cmd[], Object env[], String dirPath);
-private native int execWait();
-private native static void sendSignal0(int pid, int signum);
-private native static int getKillSignal();
-
-protected void finalize() throws Throwable {
-	super.finalize();
-	try_close(raw_stdout);
-	try_close(raw_stderr);
-	try_close(stdin_stream);
-}
-
-private static void try_close(InputStream stream) {
-	if (stream != null) {
-		try {
-			stream.close();
-		}
-		catch (IOException e) {}
-	}
-}
-
-private static void try_close(OutputStream stream) {
-	if (stream != null) {
-		try {
-			stream.close();
-		}
-		catch (IOException e) {}
-	}
-}
-
-}
-
Index: kaffe/test/regression/KaffeInternal.java
diff -u kaffe/test/regression/KaffeInternal.java:1.5 kaffe/test/regression/KaffeInternal.java:1.6
--- kaffe/test/regression/KaffeInternal.java:1.5	Sun Jul 16 23:54:25 2006
+++ kaffe/test/regression/KaffeInternal.java	Mon Jul 17 00:50:20 2006
@@ -1,5 +1,4 @@
 
-import org.kaffe.lang.UNIXProcess;
 import gnu.classpath.SystemProperties;
 
 /**
@@ -9,15 +8,6 @@
 {
     public static void main(String args[])
     {
-	try
-	{
-            UNIXProcess.sendSignal(0,0);
-	}
-	catch(Throwable th)
-	{
-	    System.out.println(th);
-	}
-
         try
         {
             SystemProperties.getProperty("java.home");
@@ -30,6 +20,5 @@
 }
 
 /* Expected Output:
-java.lang.NoClassDefFoundError: org/kaffe/lang/UNIXProcess
 java.lang.NoClassDefFoundError: gnu/classpath/SystemProperties
 */
Index: kaffe/test/regression/ProcessTest.java
diff -u kaffe/test/regression/ProcessTest.java:1.3 kaffe/test/regression/ProcessTest.java:1.4
--- kaffe/test/regression/ProcessTest.java:1.3	Fri Feb 12 13:51:10 1999
+++ kaffe/test/regression/ProcessTest.java	Mon Jul 17 00:50:20 2006
@@ -1,5 +1,4 @@
 /*
- * a simple test for kaffe.lang.UNIXProcess.
  * This will run on Unixoids only.
  *
  * We spawn a copy of the kaffe JVM which executes this program, sends




More information about the kaffe mailing list