From: Antony Dovgal Date: Thu, 17 Nov 2005 14:19:06 +0000 (+0000) Subject: fix #35079 (stream_set_blocking(true) toggles, not enables blocking) X-Git-Tag: RELEASE_0_9_3~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5e2f63d6804c3a5236916f8098662495ccf41d5;p=php fix #35079 (stream_set_blocking(true) toggles, not enables blocking) patch by askalski at gmail dot com --- 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;