Skip to content

Commit a86bdc6

Browse files
authored
io_uring: handle INTR error from pwrite (#198)
pwrite can also return INTR just like write, so handle it the same way by rearming the completion. This is the same change as in #119 but for pwrite.
2 parents fd9c03b + 19f8911 commit a86bdc6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/io_uring.zig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ pub const Completion = struct {
788788
@intCast(res)
789789
else switch (@as(posix.E, @enumFromInt(-res))) {
790790
.CANCELED => error.Canceled,
791+
// If a write is interrupted, we retry it automatically.
792+
.INTR => return .rearm,
791793
else => |errno| posix.unexpectedErrno(errno),
792794
},
793795
},

0 commit comments

Comments
 (0)