Hi, On Tue, 2009-04-07 at 16:11 +0000, Arnaud Le Blanc wrote: > lbarnaud Tue Apr 7 16:11:19 2009 UTC > > Modified files: (Branch: PHP_5_3) > /php-src/sapi/cli php_cli.c > Log: > MFH: Fixed bug #47893 (CLI aborts on non blocking stdout) > > > http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.22.2.21&r2=1.129.2.13.2.22.2.22&diff_format=u > Index: php-src/sapi/cli/php_cli.c > diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.22.2.21 > php-src/sapi/cli/php_cli.c:1.129.2.13.2.22.2.22 > --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.22.2.21 Fri Jan 9 17:21:11 2009 > +++ php-src/sapi/cli/php_cli.c Tue Apr 7 16:11:19 2009 > @@ -20,7 +20,7 @@ > +----------------------------------------------------------------------+ > */ > > -/* $Id: php_cli.c,v 1.129.2.13.2.22.2.21 2009/01/09 17:21:11 iliaa Exp $ */ > +/* $Id: php_cli.c,v 1.129.2.13.2.22.2.22 2009/04/07 16:11:19 lbarnaud Exp $ > */ > > #include "php.h" > #include "php_globals.h" > @@ -91,6 +91,12 @@ > > #include "php_getopt.h" > > +#ifndef PHP_WIN32 > +# define php_select(m, r, w, e, t) select(m, r, w, e, t) > +#else > +# include "win32/select.h" > +#endif > + > PHPAPI extern char *php_ini_opened_path; > PHPAPI extern char *php_ini_scanned_files; > > @@ -224,15 +230,38 @@ > #define STDOUT_FILENO 1 > #endif > > +static inline int sapi_cli_select(int fd) > +{ > + fd_set wfd, dfd; > + struct timeval tv; > + int ret; > + > + FD_ZERO(&wfd); > + FD_ZERO(&dfd); > + > + PHP_SAFE_FD_SET(fd, &wfd); > + > + tv.tv_sec = FG(default_socket_timeout);
Please test you're code with --enable-maintainer-zts, tsrmls is missing here. Thanks, johannes -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php