From: Dmitry Stogov Date: Tue, 22 Aug 2006 06:15:45 +0000 (+0000) Subject: Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32) X-Git-Tag: RELEASE_1_0_0RC1~1917 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d824f02ce112638882c052ba4a1f187989ce8f51;p=php Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32) --- diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 2ae79d68a5..7d62800b2c 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -194,10 +194,9 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha #elif defined(PHP_WIN32) { long handle = _get_osfhandle(self->fd); - DWORD in_buf_size, out_buf_size; if (handle != 0xFFFFFFFF) { - self->is_pipe = GetNamedPipeInfo((HANDLE)handle, NULL, &out_buf_size, &in_buf_size, NULL); + self->is_pipe = GetFileType((HANDLE)handle) == FILE_TYPE_PIPE; } } #endif