File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ public final class Process {
575575
576576 group. enter ( )
577577 stdoutPipe. fileHandleForReading. readabilityHandler = { ( fh : FileHandle ) -> Void in
578- let data = fh. availableData
578+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
579579 if ( data. count == 0 ) {
580580 stdoutPipe. fileHandleForReading. readabilityHandler = nil
581581 group. leave ( )
@@ -590,7 +590,7 @@ public final class Process {
590590
591591 group. enter ( )
592592 stderrPipe. fileHandleForReading. readabilityHandler = { ( fh : FileHandle ) -> Void in
593- let data = fh. availableData
593+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
594594 if ( data. count == 0 ) {
595595 stderrPipe. fileHandleForReading. readabilityHandler = nil
596596 group. leave ( )
You can’t perform that action at this time.
0 commit comments