Skip to content

Commit

Permalink
revoked autokill of children
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpflug committed Jun 14, 2016
1 parent 45ff003 commit 75cda90
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
9 changes: 0 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@
return child.killed = true;
}
});
process.on("SIGTERM", function() {
return child.close("SIGTERM");
});
process.on("SIGINT", function() {
return child.close("SIGINT");
});
process.on("SIGHUP", function() {
return child.close("SIGHUP");
});
child.close = function(signal) {
if (signal == null) {
signal = "SIGTERM";
Expand Down
31 changes: 31 additions & 0 deletions npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
0 info it worked if it ends with ok
1 verbose cli [ '/home/peaul/.nvm/versions/node/v5.10.1/bin/node',
1 verbose cli '/home/peaul/.nvm/versions/node/v5.10.1/bin/npm',
1 verbose cli 'version',
1 verbose cli 'patch' ]
2 info using npm@3.8.3
3 info using node@v5.10.1
4 info git [ 'status', '--porcelain' ]
5 verbose stack Error: Git working directory not clean.
5 verbose stack M index.js
5 verbose stack M src/index.coffee
5 verbose stack at /home/peaul/.nvm/versions/node/v5.10.1/lib/node_modules/npm/lib/version.js:246:19
5 verbose stack at ChildProcess.exithandler (child_process.js:193:7)
5 verbose stack at emitTwo (events.js:100:13)
5 verbose stack at ChildProcess.emit (events.js:185:7)
5 verbose stack at maybeClose (internal/child_process.js:850:16)
5 verbose stack at Socket.<anonymous> (internal/child_process.js:323:11)
5 verbose stack at emitOne (events.js:90:13)
5 verbose stack at Socket.emit (events.js:182:7)
5 verbose stack at Pipe._onclose (net.js:475:12)
6 verbose cwd /home/peaul/dev/better-spawn
7 error Linux 3.13.0-37-generic
8 error argv "/home/peaul/.nvm/versions/node/v5.10.1/bin/node" "/home/peaul/.nvm/versions/node/v5.10.1/bin/npm" "version" "patch"
9 error node v5.10.1
10 error npm v3.8.3
11 error Git working directory not clean.
11 error M index.js
11 error M src/index.coffee
12 error If you need help, you may report this error at:
12 error <https://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]
3 changes: 0 additions & 3 deletions src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ module.exports = (cmd, options) ->
child.on "close", -> child.closed = true
child.on "exit", (exitCode, signal) ->
child.killed = true if signal?
process.on "SIGTERM", -> child.close "SIGTERM"
process.on "SIGINT", -> child.close "SIGINT"
process.on "SIGHUP", -> child.close "SIGHUP"
child.close = (signal="SIGTERM") ->
unless child.closed or child.killed
child.killed = true
Expand Down

0 comments on commit 75cda90

Please sign in to comment.