mirror of
https://github.com/php/php-src.git
synced 2024-09-25 03:47:26 +00:00
Fixed bug #38488 (Access to "php://stdin" and family crashes PHP on win32)
This commit is contained in:
parent
b590503bdf
commit
d824f02ce1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user