diff --git a/test/ce593a6c480a.c b/test/ce593a6c480a.c index 1c5669ee..4c71fbc6 100644 --- a/test/ce593a6c480a.c +++ b/test/ce593a6c480a.c @@ -111,7 +111,10 @@ int main(int argc, char *argv[]) (void*) (intptr_t) other_fd); /* Wait on the event fd for an event to be ready */ - ret = read(loop_fd, buf, 8); + do { + ret = read(loop_fd, buf, 8); + } while (ret < 0 && errno == EINTR); + if (ret < 0) { perror("read"); return T_EXIT_FAIL; diff --git a/test/io-cancel.c b/test/io-cancel.c index d5e3ae9f..13bf84f6 100644 --- a/test/io-cancel.c +++ b/test/io-cancel.c @@ -365,8 +365,13 @@ static int test_cancel_req_across_fork(void) exit(0); } else { int wstatus; + pid_t childpid; - if (waitpid(p, &wstatus, 0) == (pid_t)-1) { + do { + childpid = waitpid(p, &wstatus, 0); + } while (childpid == (pid_t)-1 && errno == EINTR); + + if (childpid == (pid_t)-1) { perror("waitpid()"); return 1; }