forked from OSchip/llvm-project
rdar://problem/10492827
SBProcess.GetSTDERR() not getting stderr of the launched process Since we are launch the inferior with: process = target.LaunchSimple(None, None, os.getcwd()) i.e., without specifying stdin/out/err. A pseudo terminal is used for handling the process I/O, and we are satisfied once the expected output appears in process.GetSTDOUT(). llvm-svn: 147983
This commit is contained in:
parent
4f8cb1e83a
commit
5886fb5bd3
|
@ -49,10 +49,10 @@ class ProcessIOTestCase(TestBase):
|
|||
error = process.GetSTDERR(500)
|
||||
if self.TraceOn():
|
||||
print "output->|%s|" % output
|
||||
print "error->|%s|" % error
|
||||
# We are satisfied once "input line=>1" appears in stderr.
|
||||
# Since we launched the process without specifying stdin/out/err,
|
||||
# a pseudo terminal is used for stdout/err, and we are satisfied
|
||||
# once "input line=>1" appears in stdout.
|
||||
# See also main.c.
|
||||
#if "input line=>1" in error:
|
||||
if "input line=>1" in output:
|
||||
return
|
||||
time.sleep(5)
|
||||
|
|
|
@ -6,6 +6,8 @@ int main(int argc, char const *argv[]) {
|
|||
int count = 1;
|
||||
while (fgets(line, sizeof(line), stdin)) { // Reading from stdin...
|
||||
fprintf(stderr, "input line=>%d\n", count++);
|
||||
if (count > 3)
|
||||
break;
|
||||
}
|
||||
|
||||
printf("Exiting now\n");
|
||||
|
|
Loading…
Reference in New Issue