Skip to content

Commit d8c7bb5

Browse files
committed
Reset readabilityHandler
1 parent e8cee8e commit d8c7bb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/ShellOut.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ private extension Process {
460460

461461
if data.isEmpty { // EOF
462462
logger?.info("ShellOut.launchBash: Reporting EOF on stdout (readabilityHandler, command: \(command))")
463+
handler.readabilityHandler = nil
463464
outputGroup.leave()
464465
} else {
465466
logger?.info("ShellOut.launchBash: Read \(data.count) bytes from stdout (readabilityHandler, command: \(command))")
@@ -477,6 +478,7 @@ private extension Process {
477478

478479
if data.isEmpty { // EOF
479480
logger?.info("ShellOut.launchBash: Reporting EOF on stderr (readabilityHandler, command: \(command))")
481+
handler.readabilityHandler = nil
480482
outputGroup.leave()
481483
} else {
482484
outputQueue.async {

0 commit comments

Comments
 (0)