was testing the subprocess.js "system" function and it
has a problem, partially fixed by following:
$ diff -c subprocess.js tmp/modules/ringo/subprocess.js
*** subprocess.js Tue Dec
1 15:39:40 2015
--- tmp/modules/ringo/subprocess.js Tue Dec
1 15:40:36 2015
***************
*** 169,176 ****
exports.system = function() {
var args =
parseArguments(arguments);
var process = createProcess(args);
! var output = system.stdout,
! errput =
system.stderr;
if (args.binary) {
output =
output.raw;
errput =
errput.raw;
--- 169,176 ----
exports.system = function() {
var args =
parseArguments(arguments);
var process = createProcess(args);
! var output = process.stdout,
! errput =
process.stderr;
if (args.binary) {
output =
output.raw;
errput =
errput.raw;
however, now I get another error:
$ cat xx.js
var proc =
require("ringo/subprocess");
//okay
print(proc.command("pwd"));
proc.system("pwd");
$ ringo xx.js
/Users/russt/proj/jsfun
Wrapped java.util.concurrent.ExecutionException:
org.mozilla.javascript.JavaScriptException: Error: The TextStream is
not writable! (io.js#514)
at
ringo/subprocess.js:114 (anonymous)
at
ringo/subprocess.js:183 (anonymous)
at
/Users/russt/proj/jsfun/xx.js:4
not sure what is going on there.. it is inheriting i/o streams
from parent process, or so it looks like to me.
/russt