2
向node.js中的分叉子進程發送特殊字符(如ß)不起作用。看來,子進程無法讀取它。node.js子進程進程編碼
我可以在非常簡單的示例中向我發送一個字符(「ß」)分叉進程並返回時顯示它。
的parrent理線
var child = fork("render.js");
child.on('message', function (m) {
res.send(m);
});
//this does not work, works fine with normal 's'
child.send("ß");
setTimeout(function() {
child.kill();
res.send("Timeout error");
}, 5000);
那孩子理線
process.on('message', function (m) {
process.send(m)
process.exit();
});
爲了完整起見,我在IIS託管節點。
謝謝。在0.10.5工作 – 2013-04-30 11:28:51