Dup the correct fd for qemu pipe.
Logcat dup-es STDOUT and used the dup-ed file descriptor to write logging information. Because of this writes happen on that fd and not on stdout. This in turn causes no output in the LogcatService in the emulator. The qemu-pipe forwarder now dup-es the same fd as logcat is using so that we receive data again. Bug: b/145214141 Test: Logcat works again in emulator 29.2.10 Change-Id: Ia6e2430f1d7a0476a5b438d315a9ea337c13806d
This commit is contained in:
parent
4ac630b562
commit
4f138b2ce8
|
@ -865,7 +865,7 @@ int Logcat::Run(int argc, char** argv) {
|
|||
}
|
||||
}
|
||||
// close output and error channels, replace with console
|
||||
dup2(fd, STDOUT_FILENO);
|
||||
dup2(fd, output_fd_.get());
|
||||
dup2(fd, STDERR_FILENO);
|
||||
close(fd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue