godzie44/go-uring

Retry interrupted system calls

Closed this issue · 2 comments

WaitCQEvents can return io_uring_enter: interrupted system call. It'd be nice if interrupted syscalls were automatically retried.

UPDATE:

ERRORS
EINTR
The operation was interrupted by a delivery of a signal before it could complete; see signal(7). Can happen while waiting for events with IORING_ENTER_GETEVENTS.

https://man.archlinux.org/man/io_uring_enter.2.en

Thanks for participating!

Main idea of uring package - designed as similar as possible to liburing. So i think uring package is to low level for have a logic about handling EINTR. But i'm agreed that this logic must exists. I think better place for it - one level up - in reactor package, or any other uring caller. For example:

https://github.com/godzie44/go-uring/blob/master/reactor/reactor.go#L168

I'll close the issue for now. Feel free to reopen when you've got more questions