| ryah ( @ 2009-06-19 18:29:00 |
| Entry tags: | programming |
Why isn't there a bidirectional popen()?
Good read: http://lua-users.org/lists/lua-l/2007-1
In node I think it will look like this
var cat = popen("cat");
cat.onOutput = function (chunk) {
puts("cat said: '" + chunk + "'");
};
cat.onExit = function (code) {
puts("the cat program exited with code " + code);
};
cat.write("hello world");
cat.close();
cat.kill();