File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Sources/Basics/Concurrency Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ package final class AsyncProcess {
501501
502502 group. enter ( )
503503 stdoutPipe. fileHandleForReading. readabilityHandler = { ( fh: FileHandle ) in
504- let data = fh. availableData
504+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
505505 if data. count == 0 {
506506 stdoutPipe. fileHandleForReading. readabilityHandler = nil
507507 group. leave ( )
@@ -516,7 +516,7 @@ package final class AsyncProcess {
516516
517517 group. enter ( )
518518 stderrPipe. fileHandleForReading. readabilityHandler = { ( fh: FileHandle ) in
519- let data = fh. availableData
519+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
520520 if data. count == 0 {
521521 stderrPipe. fileHandleForReading. readabilityHandler = nil
522522 group. leave ( )
You can’t perform that action at this time.
0 commit comments