classpath
[Top][All Lists]
Advanced

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

Re: Runtime.exec() implementation


From: Archie Cobbs
Subject: Re: Runtime.exec() implementation
Date: Mon, 8 Mar 2004 16:47:27 -0600 (CST)

Grzegorz B. Prokopski wrote:
> > I wrote an implementation of Runtime.exec() (including a new class
> > java.lang.VMProcess which extends java.lang.Process and native code)
> > for JC. This can be easily merged into Classpath if people want it.
> > It seems like a pretty glaring omission.
> > 
> > This uses the usual Unix functions of fork(), exec(), waitpid(), etc.
> > and should be as portable as the existing native code.  I'd have to
> > rewrite my JCNI native code in JNI but that would be easy.
> 
> I think sure, it'd be very good idea, especially as AFAIK GNU CP has no
> working implementation. I glanced thru your code and it seems nice and
> clean, however it's also JCVM-specific (yet).
> 
> I also wonder, but I got impression that some of this stuff could be
> done in Java, not natively, which might save a lot of troubles
> when trying to make it work on variety of VMs, which ex. might not
> implement all of the JNI functions.

Yes, I agree the native part should be as minimal as possible. The only
bit that looks like it can be moved up into Java code is the call
to dirFile.toString() near the beginning of Runtime.execInternal()...
did you have more in mind, and if so how would you move it into Java?

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

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