fixed broken stdin

This commit is contained in:
Ritchie Martori
2012-09-19 12:16:59 -07:00
parent 60671d45d4
commit 8c29ea5429
2 changed files with 4 additions and 5 deletions

View File

@@ -51,9 +51,9 @@ Monitor.prototype.start = function (fn) {
} else {
start.apply(this, arguments);
}
if(!(this.child.stdout && this.child.stdin && this.child.stderr)) {
if(!(this.child.stdout && this.child.stderr)) {
this.child.stdout = process.stdout;
this.child.stdin = process.stdin;
this.child.stderr = process.stderr;
}
@@ -109,15 +109,15 @@ Monitor.createCommands = function (commands) {
}
Monitor.createMonitor = function (config) {
var opts = {stdio: [process.stdin, process.stdout, process.stderr, 'ipc']}
var opts = {stdio: ['pipe', process.stdout, process.stderr, 'ipc']}
, monitor = new Monitor(__dirname + '/start.js', opts)
, server = new EventEmitter();
keypress(process.stdin);
server.options = config;
server.listen = function () {
monitor.start(function (err, commands, restarting) {
keypress(process.stdin);
commands.start(config, function (err) {
if(err) {
server.emit('error', err);

View File

@@ -133,7 +133,6 @@ function Server(options) {
});
server.on('request:error', function (err, req, res) {
console.error(res.finished, 'finished...');
console.error();
console.error(req.method, req.url, err.stack || err);
process.exit();