From 9d84e5a3067753072db1dd7856bb29d3591f2664 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Tue, 20 Jul 2010 16:37:16 -0700 Subject: [PATCH] Let the child process connect to stdout and stderr directly. There is no need to proxy it. (Thanks pgriess) --- bin/spark | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/spark b/bin/spark index 851bbf6..9b561d4 100755 --- a/bin/spark +++ b/bin/spark @@ -342,7 +342,7 @@ function start() { process.argv[0], [__filename, '--child'], undefined, - [fds[1], -1, -1] + [fds[1], 1, 2] ); log('child spawned [bold]{' + child.pid + '}'); @@ -353,15 +353,6 @@ function start() { child.stdin.write(JSON.stringify(env), 'ascii', fd); - // Log stdout / stderr - child.stdout.addListener('data', function(data){ - process.stdout.write(data); - }); - child.stderr.addListener('data', function(data){ - // TODO: add a public API version of this. - // I'm not sure node has one yet. - process.binding('stdio').writeError(data); - }); } changeUser();