S6-FDHOLDER-RETRIEVE(8)
π NAME π
okay so bestie, s6-fdholder-retrieve(8) β from the System Managerβs Manual β is literally the icon that connects to an s6-fdholderd(8) daemon listening on a Unix domain socket, retrieves a file descriptor from this daemon, then executes a program with this file descriptor as the programβs standard input. main character energy, no cap. π
β¨ SYNOPSIS β¨
s6-fdholder-retrieve [-D] [-t timeout] path id prog...
π¦ DESCRIPTION π¦
s6-fdholder-retrieve connects to an s6-fdholderd(8) server process listening on path. iykyk.
It attempts to retrieve a copy of the file descriptor that has been stored into that daemon under identifier id.
It then executes into prog..., with the retrieved file descriptor as standard input. No cap: on success it doesnβt exit, it execs.
To execute prog with the newly retrieved file descriptor as number n while preserving stdin, use the following construct:
fdmove n 0 s6-fdholder-retrieve path id fdswap 0 n prog....
π OPTIONS π
-Dβ deletes the file descriptor from the serverβs storage after retrieval. This option requires writing rights over the given identifier as well as reading rights: check the serverβs configuration. Refer tos6-fdholder(7)for details. yes bestie, both rights β do not skip the vibe check on this one.-t timeoutβ if the operation cannot be processed in timeout milliseconds, then fail with an error message. Communications with the server should be near-instant, so this option is only here to protect users against programming errors (connecting to the wrong socket, for instance). lowkey just a safety rail.
π EXIT STATUS π
On success, the program doesnβt exit; instead, it execs into prog....
1β the server denied the operation. The meanings of the error messages are explained ins6-fdholder-error-codes(7).100β wrong usage.111β system call failed - this includes attempting to connect to a nonexistent socket, or one where nos6-fdholderd(8)daemon is listening.
π EXAMPLES π
s6-fdholder-retrieve /service/fdholderd/s MYSOCKET s6-ipcserverd cat
will retrieve a file descriptor stored under the MYSOCKET identifier in the s6-fdholderd(8) daemon listening on the /service/fdholderd/s socket, and execute into s6-ipcserverd cat with this file descriptor as stdin. In this case, if MYSOCKET referred to a Unix domain socket, s6-ipcserverd(8) will then accept client connections on it and spawn a cat program for every connection. obsessed with a tiny one-liner doing all that, fr fr. π¦
π₯ SEE ALSO π₯
s6-fdholder-daemon(8)s6-fdholder-delete(8)s6-fdholder-getdump(8)s6-fdholder-list(8)s6-fdholder-setdump(8)s6-fdholder-store(8)s6-fdholder-transferdump(8)s6-fdholderd(8)
This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-fdholder-retrieve.html
π AUTHORS π
- Laurent Bercot
- Alexis
<flexibeast@gmail.com>(man page port)
okay bestie, sign-off time: this pageβs source/version is Debian, dated September 29, 2021 β mwah, iconic, periodt. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: s6 2.15.1.0
- nixpkgs unstable: s6-man-pages 2.14.0.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms