(stream)
| 44 | this.callback = cb; |
| 45 | |
| 46 | var limitedWrite = function(stream) { |
| 47 | return function(chunk) { |
| 48 | stream.contents += chunk; |
| 49 | if (!killed && stream.contents.length > options.maxBuffer) { |
| 50 | child.kill(options.killSignal); |
| 51 | killed = true; |
| 52 | } |
| 53 | }; |
| 54 | }; |
| 55 | this.out = limitedWrite(this.stdout); |
| 56 | this.err = limitedWrite(this.stderr); |
| 57 | }; |