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 {
575
575
576
576
group. enter ( )
577
577
stdoutPipe. fileHandleForReading. readabilityHandler = { ( fh : FileHandle ) -> Void in
578
- let data = fh. availableData
578
+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
579
579
if ( data. count == 0 ) {
580
580
stdoutPipe. fileHandleForReading. readabilityHandler = nil
581
581
group. leave ( )
@@ -590,7 +590,7 @@ public final class Process {
590
590
591
591
group. enter ( )
592
592
stderrPipe. fileHandleForReading. readabilityHandler = { ( fh : FileHandle ) -> Void in
593
- let data = fh. availableData
593
+ let data = ( try ? fh. read ( upToCount : Int . max ) ) ?? Data ( )
594
594
if ( data. count == 0 ) {
595
595
stderrPipe. fileHandleForReading. readabilityHandler = nil
596
596
group. leave ( )
You can’t perform that action at this time.
0 commit comments