matyr #2800(2007/09/02 16:39 GMT) [ JavaScript ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10
function pipe(i, o){ for(var is = i.inputStream, os = o.outputStream, b; (b = is.read()) != -1; os.write(b)); os.close(); o.waitFor(); i.destroy(); } if(arguments.length < 2) quit(); with(java.lang.Runtime.runtime) var pp = [exec(arguments[0]), exec(arguments[1])]; spawn(function(){ pipe(pp[0], pp[1]) }); spawn(function(){ pipe(pp[1], pp[0]) });
Rating0/0=0.00-0+
[ reply ]
matyr
#2800()
[
JavaScript
]
Rating0/0=0.00
WSH での挑戦は atEndOfStream が挙動不審なため断念。
Rating0/0=0.00-0+
[ reply ]