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 {
501
501
502
502
group. enter ( )
503
503
stdoutPipe. fileHandleForReading. readabilityHandler = { ( fh: FileHandle ) in
504
- let data = fh. availableData
504
+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
505
505
if data. count == 0 {
506
506
stdoutPipe. fileHandleForReading. readabilityHandler = nil
507
507
group. leave ( )
@@ -516,7 +516,7 @@ package final class AsyncProcess {
516
516
517
517
group. enter ( )
518
518
stderrPipe. fileHandleForReading. readabilityHandler = { ( fh: FileHandle ) in
519
- let data = fh. availableData
519
+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
520
520
if data. count == 0 {
521
521
stderrPipe. fileHandleForReading. readabilityHandler = nil
522
522
group. leave ( )
You can’t perform that action at this time.
0 commit comments