Permalink
Browse files

fix child processes.

  • Loading branch information...
1 parent 2e87b5c commit 1ed8237bf1e1f114fe3b0c73eb6717f1821beb42 @chjj committed Jan 27, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 bin/charged
View
@@ -394,6 +394,8 @@ shell.spawn = function(path, name, args, callback) {
fs.writeFile(tmp, results, function(err) {
if (err) return callback(err);
+ process.stdin.pause();
+
var ps = spawn(name, args.concat(tmp), {
cwd: process.cwd(),
env: process.env,
@@ -402,6 +404,7 @@ shell.spawn = function(path, name, args, callback) {
});
ps.on('exit', function() {
+ process.stdin.resume();
fs.unlink(tmp, function() {
return callback();
});

0 comments on commit 1ed8237

Please sign in to comment.