免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2015年7月8日 星期三

nodejs exec and execFile


https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

* child_process.exec(command[, options], callback)
* child_process.execFile(file[, args][, options][, callback])


child_process.execFile() is similar to child_process.exec() except it does not execute a subshell
but rather the specified file directly.
This makes it slightly leaner than child_process.exec.


* child_process.fork(modulePath[, args][, options])
This is a special case of the spawn() functionality for spawning Node processes.

In addition to having all the methods in a normal ChildProcess instance,
the returned object has a communication channel built-in.

These child Nodes are still whole new instances of V8.
Assume at least 30ms startup and 10mb memory for each new Node.
That is, cannot create many thousands of them.


沒有留言:

張貼留言