qlibs:(fd)
π qlibs:(fd) β the fd page, but make it bestie-coded π
okay so this is the qlibs:(fd) manual, page 3 energy, and weβre talking about file-descriptor glow-ups: duplicating, moving, and closing. no cap, every detail is staying. π«Ά
πΈ NAME πΈ
fd β duplicate, move or close a file descriptor.
β¨ SYNTAX β¨
#include "fd.h"
int fd_copy(int to,int from);
int fd_move(int to,int from);
int fd_coe(int fd);
π¦ DESCRIPTION π¦
fd_copyβ copies descriptor from to descriptor to. If to was already open,fd_copycloses it.fd_copyalways leaves from intact; if to and from are the same number,fd_copydoes nothing.
π¨ caveat, bestie: fd_copy does not guarantee that to will remain open, if it was open, in case of error.
fd_moveβ moves descriptor from to descriptor to. If to was already open,fd_movecloses it. If the move is successful,fd_movecloses from. Exception: if to and from are the same number,fd_movedoes nothing.fd_coeβ closesfd.
π RETURN CODES π
fd_copy, fd_move, and fd_coe return 0 on success, and -1 on error. thatβs it, thatβs the whole vibe check. β¨
π SEE ALSO π
made with π from qlibs:(fd) Β· page 3 Β· date: not listed in the footer of this copy, bestie β so weβre reporting exactly whatβs there. π
π¦ where this page comes from
- alpine 3.24: fehqlibs-doc 31-r0 Β· Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms