Fixed wrong pipe detection code

This commit is contained in:
Dmitry Stogov 2006-09-28 07:26:02 +00:00
parent 9c4e7a0743
commit dbae50bf13

View file

@ -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