On Wed, Aug 15, 2012 at 9:01 AM, TZ <[email protected]> wrote:
> do I miss something?
>
>>
>> [root@etone46 backups]# node 1.js
>> child_process.js:790
>>     throw errnoException(errno, 'spawn');
>>           ^
>> Error: spawn EINVAL
>>     at errnoException (child_process.js:838:11)
>>     at ChildProcess.spawn (child_process.js:790:11)
>>     at exports.spawn (child_process.js:614:9)
>>     at Object.<anonymous> (/opt/backups/1.js:3:14)
>>     at Module._compile (module.js:449:26)
>>     at Object.Module._extensions..js (module.js:467:10)
>>     at Module.load (module.js:356:32)
>>     at Function.Module._load (module.js:312:12)
>>     at Module.runMain (module.js:492:10)
>>     at process.startup.processNextTick.process._tickCallback
>> (node.js:244:9)
>
>
>
> 1.js is copy from docs:
>
> var util  = require('util'),
>     spawn = require('child_process').spawn,
>         ls    = spawn('ls', ['-lh', '/usr']);
>         ls.stdout.on('data', function (data) {
>               console.log('stdout: ' + data);
>         });
>         ls.stderr.on('data', function (data) {
>               console.log('stderr: ' + data);
>         });
>         ls.on('exit', function (code) {
>               console.log('child process exited with code ' + code);
>         });

That error comes from inside libuv (e.g. the C runtime).

What platform is this? If it's Linux, what does `strace -e
\!mmap,munmap,mprotect,futex node 1.js` print?

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to