]> granicus.if.org Git - php/commitdiff
Fixed bug #69900 Too long timeout on pipes
authorAnatol Belski <ab@php.net>
Tue, 28 Jul 2015 08:28:45 +0000 (10:28 +0200)
committerAnatol Belski <ab@php.net>
Tue, 28 Jul 2015 08:28:45 +0000 (10:28 +0200)
main/streams/plain_wrapper.c

index 8ef061924c757086bc07e9fa8d7c60dcd218410a..7ffb6663d8c30239803113e05498c755b60cc43a 100644 (file)
@@ -358,11 +358,11 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS
                                if (!PeekNamedPipe(ph, NULL, 0, NULL, &avail_read, NULL)) {
                                        break;
                                }
-                               /* If there's nothing to read, wait in 100ms periods. */
+                               /* If there's nothing to read, wait in 10ms periods. */
                                if (0 == avail_read) {
-                                       usleep(100000);
+                                       usleep(10);
                                }
-                       } while (0 == avail_read && retry++ < 320);
+                       } while (0 == avail_read && retry++ < 3200000);
 
                        /* Reduce the required data amount to what is available, otherwise read()
                                will block.*/