aio-posix: signal-proof fdmon-io_uring

The io_uring_enter(2) syscall returns with errno=EINTR when interrupted
by a signal.  Retry the syscall in this case.

It's essential to do this in the io_uring_submit_and_wait() case.  My
interpretation of the Linux v5.5 io_uring_enter(2) code is that it
shouldn't affect the io_uring_submit() case, but there is no guarantee
this will always be the case.  Let's check for -EINTR around both APIs.

Note that the liburing APIs have -errno return values.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Stefano Garzarella <>
Reviewed-by: Philippe Mathieu-Daudé <>
Signed-off-by: Stefan Hajnoczi <>
1 file changed