Browse Source

Fixed wrong pipe detection code

PECL_OPENSSL
Dmitry Stogov 20 years ago
parent
commit
dbae50bf13
  1. 3
      main/streams/plain_wrapper.c

3
main/streams/plain_wrapper.c

@ -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…
Cancel
Save