]> granicus.if.org Git - php/commitdiff
Fixed wrong pipe detection code
authorDmitry Stogov <dmitry@php.net>
Thu, 28 Sep 2006 07:26:19 +0000 (07:26 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 28 Sep 2006 07:26:19 +0000 (07:26 +0000)
main/streams/plain_wrapper.c

index 4c86bae3c87d29332cbe94ce35e443fbd0284cfc..6da51946b1b942f8d07f7c7ccfc98d4c55719a92 100644 (file)
@@ -243,10 +243,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