io_uring_prep_tee(3)
β¨ io_uring_prep_tee(3) β¨
okay bestie, welcome to the liburing Manual π this one's about io_uring_prep_tee, and no, we're not talking about your favorite oversized t-shirt. we're talking about duplicating pipe data. iconic behavior tbh π«Ά
πΈ NAME πΈ
io_uring_prep_tee β prepare a tee request π
π¦ SYNOPSIS π¦
#include <fcntl.h>
#include <liburing.h>
void io_uring_prep_tee(struct io_uring_sqe *sqe,
int fd_in,
int fd_out,
unsigned int nbytes,
unsigned int splice_flags);
look at her. five whole arguments. main character energy fr fr π
π DESCRIPTION π
so the io_uring_prep_tee(3) function prepares a tee request. she sets up the submission queue entry sqe so that it uses the file descriptor fd_in as input and the file descriptor fd_out as output, duplicating nbytes bytes worth of data. and then splice_flags? those are the modifier flags for the operation, bestie. if you wanna know the generic splice flags, go check tee(2), she has the lore πβ¨
now here's the tea on the fd_out descriptor β IOSQE_FIXED_FILE can be set in the SQE to indicate that it's a fixed file. and for the input file, the io_uring specific SPLICE_F_FD_IN_FIXED can be set, and fd_in gets given as a registered file descriptor offset. yes, that's a mouthful. yes, it's giving very specific. slay π
this function prepares an async tee(2) request. see that man page for the deets, i'm not about to gatekeep you from the source π
π RETURN VALUE π
None. that's it. that's the whole section. she returns nothing and she's unbothered π
β ERRORS β
the CQE res field will contain the result of the operation. see the related man page for details on the possible values π
β οΈ okay important thing, listen up: where synchronous system calls will return-1on failure and seterrnoto the actual error value, io_uring never useserrno. instead it returns the negated errno directly in the CQEresfield. not me being dramatic but this trips people UP. note it. remember it. periodt π
π₯ SEE ALSO π₯
and that's the whole page bestie!! this was brought to you by liburing-2.2, dated March 13, 2022 β yeah she's a lil vintage but she still eats π go forth and duplicate your pipe data responsibly, mwah πβ¨π¦
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian bookworm: liburing-dev 2.3-3
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu noble: liburing-dev 2.5-1build1
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2022 Jens Axboe <axboe@kernel.dk>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms