child process: don't send signal if process is already terminated
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 4 Aug 2011 19:24:38 +0000 (21:24 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 4 Aug 2011 19:28:49 +0000 (21:28 +0200)
Fixes failing test test/simple/test-exec-max-buffer.js

lib/child_process_uv.js

index 00a43a0..6f3a40a 100644 (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?
   }