Wez Furlong wrote:
I have to go out for a couple of hours; if you could track down where PHP is
blocking in the 4.3 branch, I'd very much appreciate it.

It hangs in main/network.c the change introduced from 1.83.2.20 to 1.83.2.21 in the select shown here if no data can be read (yet). This doesn't mean that we encountered an eof though. (Another small nitpick is that tv.tv_usec is not initialized if default_socket_timeout is used).


main/network.c:
@@ -1139,9 +1139,15 @@
        int alive = 1;
        int fd = sock->socket;
        fd_set rfds;
-       struct timeval tv = {0, 0};
+       struct timeval tv;
        char buf;

+       if (sock->timeout.tv_sec == -1) {
+               tv.tv_sec = FG(default_socket_timeout);
+       } else {
+               tv = sock->timeout;
+       }
+
        /* logic: if the select call indicates that there is data to
         * be read, but a read returns 0 bytes of data, then the socket
         * has been closed.
         */

        FD_ZERO(&rfds);
        FD_SET(fd, &rfds);
        if (select(fd+1, &rfds, NULL, NULL, &tv) > 0) {

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to