Index: runtime/bin/file_linux.cc |
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc |
index 309971531c94050179c43745ca745f0f6d541a4b..0cd9dec4469633f1a0d8ffda3524e3b633258b27 100644 |
--- a/runtime/bin/file_linux.cc |
+++ b/runtime/bin/file_linux.cc |
@@ -155,8 +155,8 @@ File* File::ScopedOpen(const char* name, FileOpenMode mode) { |
// Report errors for non-regular files. |
struct stat64 st; |
if (TEMP_FAILURE_RETRY(stat64(name, &st)) == 0) { |
- // Only accept regular files and character devices. |
- if (!S_ISREG(st.st_mode) && !S_ISCHR(st.st_mode)) { |
+ // Only accept regular files, character devices, and pipes. |
+ if (!S_ISREG(st.st_mode) && !S_ISCHR(st.st_mode) && !S_ISFIFO(st.st_mode)) { |
errno = (S_ISDIR(st.st_mode)) ? EISDIR : ENOENT; |
return NULL; |
} |