child process: don't send signal if process is already terminated

Fixes failing test test/simple/test-exec-max-buffer.js
v0.7.4-release
Ben Noordhuis 2011-08-04 21:24:38 +02:00
parent eeece4f5ea
commit 5a49522ba7
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ ChildProcess.prototype.kill = function(sig) {
throw new Error('Unknown signal: ' + sig);
}
if (!this.signalCode && !this.exitCode) {
if (this._internal) {
var r = this._internal.kill(signal);
// TODO: raise error if r == -1?
}