| Index: runtime/bin/eventhandler_macos.cc
|
| diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
|
| index 0342745ea595cac4d75a3f703d49fdd8d1e4a7a8..526fd55bb986d2040205dbe3bf07d2f44f8d497f 100644
|
| --- a/runtime/bin/eventhandler_macos.cc
|
| +++ b/runtime/bin/eventhandler_macos.cc
|
| @@ -241,9 +241,10 @@ intptr_t EventHandlerImplementation::GetPollEvents(struct pollfd* pollfd) {
|
| event_mask = (1 << kErrorEvent);
|
| } else {
|
| if (sd->IsPipe()) {
|
| - // For stdin when reading from a terminal treat POLLIN with 0
|
| - // available bytes as end-of-file.
|
| - if (sd->fd() == STDIN_FILENO && isatty(sd->fd())) {
|
| + // When reading from stdin (either from a terminal or piped
|
| + // input) treat POLLIN with 0 available bytes as
|
| + // end-of-file.
|
| + if (sd->fd() == STDIN_FILENO) {
|
| event_mask = (1 << kCloseEvent);
|
| sd->MarkClosedRead();
|
| }
|
|
|