mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fixed wrong pipe detection code
This commit is contained in:
parent
9c4e7a0743
commit
dbae50bf13
1 changed files with 1 additions and 2 deletions
|
@ -242,10 +242,9 @@ PHPAPI php_stream *_php_stream_fopen_from_file(FILE *file, const char *mode STRE
|
|||
#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…
Add table
Add a link
Reference in a new issue