cvs: php4(PHP_4_3) /main streams.c

From: Date: Fri, 23 May 2003 15:27:09 +0000
Subject: cvs: php4(PHP_4_3) /main streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-21222@lists.php.net to get a copy of this message
wez Fri May 23 11:27:09 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c Log: Avoid greedy reads on FIFOs Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.65 php4/main/streams.c:1.125.2.66 --- php4/main/streams.c:1.125.2.65 Fri May 23 07:10:34 2003 +++ php4/main/streams.c Fri May 23 11:27:09 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.65 2003/05/23 11:10:34 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.66 2003/05/23 15:27:09 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1397,7 +1397,7 @@ if (stream) { if (self->is_pipe) { - stream->flags |= PHP_STREAM_FLAG_NO_SEEK; + stream->flags |= PHP_STREAM_FLAG_NO_SEEK | PHP_STREAM_FLAG_AVOID_BLOCKING; } else { stream->position = ftell(file); } @@ -1419,7 +1419,7 @@ self->temp_file_name = NULL; stream = php_stream_alloc_rel(&php_stream_stdio_ops, self, 0, mode); - stream->flags |= PHP_STREAM_FLAG_NO_SEEK; + stream->flags |= PHP_STREAM_FLAG_NO_SEEK | PHP_STREAM_FLAG_AVOID_BLOCKING; return stream; } @@ -2041,7 +2041,7 @@ if (stream) { if (self->is_pipe) { - stream->flags |= PHP_STREAM_FLAG_NO_SEEK; + stream->flags |= PHP_STREAM_FLAG_NO_SEEK | PHP_STREAM_FLAG_AVOID_BLOCKING; } else { stream->position = lseek(self->fd, 0, SEEK_CUR); }

« previous php.cvs (#21222) next »