mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Fixed phpdbg exit unexpected after signal SIGCONT on OS X
This commit is contained in:
parent
4faf7476f9
commit
ca31711625
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user