classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Runtime fixlet


From: Tom Tromey
Subject: Runtime fixlet
Date: 13 Aug 2002 17:57:01 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

This changes the reference VM's Runtime so that it doesn't create a
new environment when ENV==null.  Is this something that ought to go
in?  I'm putting it into libgcj (along with a patch to pass DIR to
execInternal), but I don't really know the rules for changing this
part of Classpath.

The rationale for this patch is that you want to preserve the case
where ENV==null so that the native code can decide whether to preserve
the current process' environment.

Tom

Index: ChangeLog
from  Tom Tromey  <address@hidden>

        * vm/reference/java/lang/Runtime.java (exec): Don't create new
        environment if ENV==null.

Index: vm/reference/java/lang/Runtime.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/Runtime.java,v
retrieving revision 1.18
diff -u -r1.18 Runtime.java
--- vm/reference/java/lang/Runtime.java 28 Apr 2002 17:36:45 -0000 1.18
+++ vm/reference/java/lang/Runtime.java 13 Aug 2002 23:50:49 -0000
@@ -538,8 +538,6 @@
     SecurityManager sm = securityManager; // Be thread-safe!
     if (sm != null)
       sm.checkExec(cmd[0]);
-    if (env == null)
-      env = new String[0];
     //XXX Should be:    return execInternal(cmd, env, dir);
     return execInternal(cmd, env);
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]