C9错误:由于安全原因禁用了产卵

我正在遵循http://nodebeginner.org上的步骤,并使用C9作为我的IDE。 当我require child_process时,我得到这个错误:

码:

 var exec = require("child_process").exec; function start(response) { console.log("Request handler 'start' was called."); exec("ls -lah", function (error, stdout, stderr) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write(stdout); response.end(); }); } function upload(response) { console.log("Request handler 'upload' was called."); response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello Upload"); response.end(); } exports.start = start; exports.upload = upload; 

错误:

 Request handler 'start' was called. child_process.js:243 var fds = this._internal.spawn(path, ^ Error: Spawn disabled for securtity reasons at ChildProcess.spawn (child_process.js:243:28) at child_process.js:31:15 at child_process.js:77:15 at child_process.js:38:27 at Object.start (/mnt/ws/users/mithun-daa/104441/requestHandler.js:6:3) at route (/mnt/ws/users/mithun-daa/104441/router.js:4:20) at Server.onRequest (/mnt/ws/users/mithun-daa/104441/server.js:9:5) at Server.emit (events.js:67:17) at HTTPParser.onIncoming (http.js:1134:12) at HTTPParser.onHeadersComplete (http.js:108:31) 

任何帮助,将不胜感激。

由于安全原因,C9阻止您使用subprocess。 你将无法在那里使用subprocess,而是在本地尝试。