开发者

Why can't I spawn a simple command with node.js?

pipe(): Too many open files

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Error spawn开发者_JS百科ing

That's my error. My code is:

grep  = spawn 'ls' 

UPDATE

for tweet in indexedTweetsResults exec 'ls', (error, stdout, stderr) -> console.log stdout

This is my code and it errors with the pipe error. Any ideas?


YOu need to do

exec = require("child_process").exec

and then somewhere do

exec("ls", function(error, stdout, stderr) {
   // handle error, stdout, stderr
});

you have to write javascript....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜