-
-
Save cmb69/697190ceb936f89d271eab3b77bb79a8 to your computer and use it in GitHub Desktop.
PR #4684
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main/streams/plain_wrapper.c | 4 +++- | |
1 file changed, 3 insertions(+), 1 deletion(-) | |
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c | |
index bc24423aab..61b19e48ad 100644 | |
--- a/main/streams/plain_wrapper.c | |
+++ b/main/streams/plain_wrapper.c | |
@@ -251,7 +251,9 @@ static void detect_is_pipe(php_stdio_stream_data *self) { | |
zend_uintptr_t handle = _get_osfhandle(self->fd); | |
if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) { | |
- self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; | |
+ DWORD file_type = GetFileType((HANDLE)handle); | |
+ | |
+ self->is_pipe = file_type == FILE_TYPE_PIPE || file_type == FILE_TYPE_CHAR; | |
} | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment