aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/shell_common.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index eb2c4fbf5..9d74dcb7a 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -129,18 +129,6 @@ shell_builtin_read(struct builtin_read_params *params)
129 * bash seems to ignore -p PROMPT for this use case. 129 * bash seems to ignore -p PROMPT for this use case.
130 */ 130 */
131 int r; 131 int r;
132#if ENABLE_PLATFORM_MINGW32
133 HANDLE handle = (HANDLE)_get_osfhandle(fd);
134 DWORD filetype = FILE_TYPE_UNKNOWN;
135
136 if (handle != INVALID_HANDLE_VALUE)
137 filetype = GetFileType(handle);
138 /* poll uses WaitForSingleObject which can't handle disk files */
139 if (filetype == FILE_TYPE_DISK || filetype == FILE_TYPE_UNKNOWN)
140 return (const char *)(uintptr_t)(0);
141 if (isatty(fd))
142 return (const char *)(uintptr_t)(1);
143#endif
144 pfd[0].events = POLLIN; 132 pfd[0].events = POLLIN;
145 r = poll(pfd, 1, /*timeout:*/ 0); 133 r = poll(pfd, 1, /*timeout:*/ 0);
146 /* Return 0 only if poll returns 1 ("one fd ready"), else return 1: */ 134 /* Return 0 only if poll returns 1 ("one fd ready"), else return 1: */