1io_uring_prep_close(3) liburing Manual io_uring_prep_close(3)
2
3
4
6 io_uring_prep_close - prepare a file descriptor close request
7
9 #include <liburing.h>
10
11 void io_uring_prep_close(struct io_uring_sqe *sqe,
12 int fd);
13
14 void io_uring_prep_close_direct(struct io_uring_sqe *sqe,
15 unsigned file_index);
16
18 The io_uring_prep_close(3) function prepares a close request. The sub‐
19 mission queue entry sqe is setup to close the file descriptor indicated
20 by fd.
21
22 For a direct descriptor close request, the offset is specified by the
23 file_index argument instead of the fd. This is identical to unregis‐
24 tering the direct descriptor, and is provided as a convenience.
25
26 These functions prepare an async close(2) request. See that man page
27 for details.
28
29
31 None
32
34 The CQE res field will contain the result of the operation. See the re‐
35 lated man page for details on possible values. Note that where synchro‐
36 nous system calls will return -1 on failure and set errno to the actual
37 error value, io_uring never uses errno. Instead it returns the negated
38 errno directly in the CQE res field.
39
41 io_uring_get_sqe(3), io_uring_submit(3), close(2)
42
43
44
45liburing-2.2 March 13, 2022 io_uring_prep_close(3)