@@ -707,8 +707,8 @@ struct _ParentProcess {
707
707
}
708
708
709
709
internal mutating func _readFromChild(
710
- onStdoutLine: ( String ) -> Bool ,
711
- onStderrLine: ( String ) -> Bool
710
+ onStdoutLine: ( String ) -> ( done : Bool , Void ) ,
711
+ onStderrLine: ( String ) -> ( done : Bool , Void )
712
712
) {
713
713
var readfds = _stdlib_fd_set ( )
714
714
var writefds = _stdlib_fd_set ( )
@@ -735,14 +735,14 @@ struct _ParentProcess {
735
735
if readfds. isset ( _childStdout. fd) || errorfds. isset ( _childStdout. fd) {
736
736
_childStdout. read ( )
737
737
while let line = _childStdout. getline ( ) {
738
- done = onStdoutLine ( line)
738
+ ( done: done , ( ) ) = onStdoutLine ( line)
739
739
}
740
740
continue
741
741
}
742
742
if readfds. isset ( _childStderr. fd) || errorfds. isset ( _childStderr. fd) {
743
743
_childStderr. read ( )
744
744
while let line = _childStderr. getline ( ) {
745
- done = onStderrLine ( line)
745
+ ( done: done , ( ) ) = onStderrLine ( line)
746
746
}
747
747
continue
748
748
}
@@ -784,7 +784,7 @@ struct _ParentProcess {
784
784
var capturedCrashStderr : [ String ] = [ ]
785
785
var anyExpectFailedInChild = false
786
786
787
- func processLine( _ line: String , isStdout: Bool ) -> Bool {
787
+ func processLine( _ line: String , isStdout: Bool ) -> ( done : Bool , Void ) {
788
788
var line = line
789
789
if let index = findSubstring ( line, _stdlibUnittestStreamPrefix) {
790
790
let controlMessage =
@@ -809,7 +809,7 @@ struct _ParentProcess {
809
809
}
810
810
line = line [ line. startIndex..< index]
811
811
if line. isEmpty {
812
- return stdoutEnd && stderrEnd
812
+ return ( done : stdoutEnd && stderrEnd, ( ) )
813
813
}
814
814
}
815
815
if isStdout {
@@ -829,7 +829,7 @@ struct _ParentProcess {
829
829
} else {
830
830
print ( " stderr>>> \( line) " )
831
831
}
832
- return stdoutEnd && stderrEnd
832
+ return ( done : stdoutEnd && stderrEnd, ( ) )
833
833
}
834
834
835
835
_readFromChild (
0 commit comments