summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-09-28 07:26:02 +0000
committerDmitry Stogov <dmitry@php.net>2006-09-28 07:26:02 +0000
commitdbae50bf13c337a71cecbb310547b5ce46a3bda5 (patch)
tree044af6cbc9e105c6762ede759235620a1e360aa0
parent9c4e7a07437b6d9984c4d1279e84ab42bbcb0a8f (diff)
downloadphp-git-dbae50bf13c337a71cecbb310547b5ce46a3bda5.tar.gz
Fixed wrong pipe detection code
-rw-r--r--main/streams/plain_wrapper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c
index 0fa946ebfc..f0c4f8436c 100644
--- a/main/streams/plain_wrapper.c
+++ b/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