(subprocess)
| 315 | |
| 316 | |
| 317 | function flushStdio(subprocess) { |
| 318 | const stdio = subprocess.stdio; |
| 319 | |
| 320 | if (stdio == null) return; |
| 321 | |
| 322 | for (let i = 0; i < stdio.length; i++) { |
| 323 | const stream = stdio[i]; |
| 324 | // TODO(addaleax): This doesn't necessarily account for all the ways in |
| 325 | // which data can be read from a stream, e.g. being consumed on the |
| 326 | // native layer directly as a StreamBase. |
| 327 | if (!stream || !stream.readable || stream[kIsUsedAsStdio]) { |
| 328 | continue; |
| 329 | } |
| 330 | stream.resume(); |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | |
| 335 | function createSocket(pipe, readable) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…