Skip to content

Commit 6aa7886

Browse files
committed
Improve -EINTR detection in um_wait_for_cqe_without_gvl
1 parent ce23139 commit 6aa7886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/um/um.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void *um_wait_for_cqe_without_gvl(void *ptr) {
140140
//
141141
// https://github.com/axboe/liburing/issues/1280
142142
int res = io_uring_submit_and_wait_timeout(&ctx->machine->ring, &ctx->cqe, 1, NULL, NULL);
143-
ctx->result = (!ctx->cqe) ? -EINTR : res;
143+
ctx->result = (res > 0 && !ctx->cqe) ? -EINTR : res;
144144
}
145145
else
146146
ctx->result = io_uring_wait_cqe(&ctx->machine->ring, &ctx->cqe);

0 commit comments

Comments
 (0)