diff options
Diffstat (limited to 'sapi/phpdbg/phpdbg_io.c')
| -rw-r--r-- | sapi/phpdbg/phpdbg_io.c | 10 | 
1 files changed, 9 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c index 1f004fbae1..58ea06e299 100644 --- a/sapi/phpdbg/phpdbg_io.c +++ b/sapi/phpdbg/phpdbg_io.c @@ -178,11 +178,19 @@ PHPDBG_API int phpdbg_send_bytes(int sock, const char *ptr, int len) {  PHPDBG_API int phpdbg_mixed_read(int sock, char *ptr, int len, int tmo) { +	int ret; +  	if (PHPDBG_G(flags) & PHPDBG_IS_REMOTE) {  		return phpdbg_consume_bytes(sock, ptr, len, tmo);  	} -	return read(sock, ptr, len); +	ret = read(sock, ptr, len); +	if (ret == (size_t)-1 && errno == EINTR) { +		/* Read was interrupted, retry once */ +		ret = read(sock, ptr, len); +	} + +	return ret;  }  | 
