mirror of https://github.com/YosysHQ/yosys.git
Gracefully handle EINTR during read.
EINTR should be retried.
This commit is contained in:
parent
fc6433bbae
commit
b98d7b6853
|
|
@ -1194,7 +1194,10 @@ bool read_until_abc_done(abc_output_filter &filt, int fd, DeferredLogs &logs) {
|
||||||
bool seen_source_cmd = false;
|
bool seen_source_cmd = false;
|
||||||
bool seen_yosys_abc_done = false;
|
bool seen_yosys_abc_done = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
int ret = read(fd, buf, sizeof(buf) - 1);
|
int ret;
|
||||||
|
do {
|
||||||
|
ret = read(fd, buf, sizeof(buf) - 1);
|
||||||
|
} while (ret == -1 && errno == EINTR);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
logs.log_error("Failed to read from ABC, errno=%d\n", errno);
|
logs.log_error("Failed to read from ABC, errno=%d\n", errno);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue