[Top][All Lists]

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

Re: Runtime.exec() implementation

From: Grzegorz B. Prokopski
Subject: Re: Runtime.exec() implementation
Date: Mon, 08 Mar 2004 02:34:20 -0500

W liƛcie z czw, 04-03-2004, godz. 11:00, Archie Cobbs pisze: 
> FYI,
> 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.

IMHO it'd be best if the native part was as dumb, simple and small as
possible: fed with possibly ready to use data, doing only minimal job
and returning error codes based on which Java counterpart could take an
action (like throwin an Exception, etc.). That would assume very little
about VM's capabilities.

What do you think?

                                Grzegorz B. Prokopski

Grzegorz B. Prokopski <address@hidden>
Debian GNU/Linux
SableVM - LGPLed JVM
Why SableVM ?!?

reply via email to

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