[armedbear] #422: SYSTEM:RUN-PROGRAM does not work on Java 5/6
armedbear
armedbear-devel at common-lisp.net
Fri Nov 18 09:31:50 UTC 2016
#422: SYSTEM:RUN-PROGRAM does not work on Java 5/6
------------------------------------------------+------------------------
Reporter: mevenson | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.5.0
Component: interpreter | Version: 1.4.0
Keywords: cffi sys:run-progrom java-5 java-6 | Parent Tickets:
------------------------------------------------+------------------------
In chasing down the errors with CFFI on CL-TEST-GRID <https://mailman
.common-lisp.net/pipermail/armedbear-devel/2016-October/003719.html>, I
have found that the [java.lang.ProcessBuilder$Redirect][] interface used
by Elias and Olof to extend SYS:RUN-PROGRAM for different types of I/O
abstractions was introduced with Java 7, and will hence not work on
earlier Java implementations.
[java.lang.ProcessBuilder$Redirect]:
https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.Redirect.html
Invoking ABCL-ASDF:ENSURE-MVN-VERSION, the following form causes the error
{{{
(JFIELD "java.lang.ProcessBuilder$Redirect" "INHERIT")
}}}
TODO: investigate the Java 6 APIs to see if there is a way to do I/O
redirection with backwards compatibility. I currently suspect that there
is no way to support Java 5/6 for this usage, which is why we never
implemented I/O redirection previously.
There is undoubtedly a way re-write the SYS:RUN-PROGRAM interface so that
we may invoke a process to read its output as a string in Java 5/Java 6,
as it worked before. But we will have to figure out a way to advertise
the different features of SYS:RUN-PROGRAM depending on the hosting VM.
Longer term, we may want to deprecate Java 5/6, but I would really have
the compiler emit Java 7-compatible bytecode (mainly by passing the Java 6
verification process) before we begin that.
--
Ticket URL: <http://abcl.org/trac/ticket/422>
armedbear <http://abcl.org>
armedbear
More information about the armedbear-ticket
mailing list