]> granicus.if.org Git - php/commitdiff
Fixed the fix in f68dc94aa727085040650b4c9354672f2f62ee6a
authorXinchen Hui <laruence@php.net>
Wed, 27 May 2015 08:47:15 +0000 (16:47 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 27 May 2015 08:47:15 +0000 (16:47 +0800)
sapi/phpdbg/phpdbg_io.c

index 47899abf666e8085cfe2126c47d3afc08a71471e..70709eadc1a53d84c174acb568b9d58a00e60fd1 100644 (file)
@@ -184,11 +184,9 @@ PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo) {
                return phpdbg_consume_bytes(sock, ptr, len, tmo);
        }
 
-       ret = read(sock, ptr, len);
-       if (ret == -1 && errno == EINTR) {
-               /* Read was interrupted, retry once */
+       do {
                ret = read(sock, ptr, len);
-       }
+       } while (ret == -1 && errno == EINTR);
 
        return ret;
 }