From 1a78dc5fbf54732e9edb27a79dc1116d971adf7f Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 17 Nov 2005 14:19:40 +0000 Subject: MFH: fix #35079 (stream_set_blocking(true) toggles, not enables blocking) patch by askalski at gmail dot com --- main/streams/plain_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/streams/plain_wrapper.c') diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 6acb5edc86..83e0e74165 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -540,7 +540,7 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void flags = fcntl(fd, F_GETFL, 0); oldval = (flags & O_NONBLOCK) ? 0 : 1; if (value) - flags ^= O_NONBLOCK; + flags &= ~O_NONBLOCK; else flags |= O_NONBLOCK; -- cgit v1.2.1