S6-FDHOLDER-STORE(8)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

πŸ’– s6-fdholder-store(8) β€” the system manager's manual, but make it cute πŸ’–

okay so bestie, welcome to s6-fdholder-store, a page from the System Manager's Manual that's about handing a file descriptor to a daemon so it can babysit it for you. yes, that's a real job. slay. πŸŽ€


✨ NAME ✨

s6-fdholder-store β€” connect to an s6-fdholderd(8) daemon listening on a Unix domain socket, and give it a copy of one of its open file descriptors for the daemon to hold. πŸ’…

like, it's a whole handoff. you hand the fd over, the daemon holds it, everybody wins. 🫢


🌸 SYNOPSIS 🌸

s6-fdholder-store [-d fd] [-T fdtimeout] [-t timeout] path id

πŸ¦‹ DESCRIPTION πŸ¦‹

s6-fdholder-store connects to an s6-fdholderd(8) server process listening on path.

it then tries to pass a copy of its standard input β€” or of its descriptor fd, if you said so β€” to the server, with identifier id. that id is the name tag the daemon files it under, so you can ask for it back later. iconic behavior honestly. ✨


πŸ‘‘ OPTIONS πŸ‘‘

  • -d fd β€” store descriptor number fd. by default, fd is 0, which is literally the program's stdin, so the default vibe is "here's my stdin, please hold". πŸ“
  • -T fdtimeout β€” the descriptor gets stored with an expiration time of fdtimeout milliseconds. meaning: the s6-fdholderd(8) daemon will close it and get rid of it after that time. by default, fdtimeout is 0, which means infinite β€” no expiration time, it lives forever (or at least until someone deletes it). ⭐
  • -t timeout β€” if the operation can't be processed within timeout milliseconds, then fail with an error message. ngl, 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). it's giving seatbelt energy. πŸš—πŸ’¨

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” Success. ate and left no crumbs. πŸ”₯
  • 1 β€” The server denied the operation. the meanings of the error messages are explained in s6-fdholder-error-codes(7), so go read that if you're confused. πŸ™ˆ
  • 100 β€” Wrong usage. you called it weird, bestie. 😭
  • 111 β€” System call failed β€” this includes attempting to connect to a nonexistent socket, or one where no s6-fdholderd(8) daemon is listening. πŸ‘»

🌈 EXAMPLES 🌈

s6-ipcserver-socketbinder /tmp/mysocket s6-fdholder-store
/service/fdholderd/s MYSOCKET

okay so what this does: it will open a Unix domain socket, bind it to /tmp/mysocket and listen to incoming connections, then give it to an s6-fdholderd(8) instance listening on /service/fdholderd/s, with no expiration date, with the β€œMYSOCKET” identifier. πŸŽ€

another program will be able to retrieve the socket later, using s6-fdholder-retrieve(8). it's the circle of fd life. πŸ¦‹


πŸ’œ SEE ALSO πŸ’œ

this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6/s6-fdholder-store.html β€” go give it a read if you want the original author's exact words. πŸ“š


🧚 AUTHORS 🧚

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

bestie reminder: this page is Debian's, dated September 29, 2021, and it's page S6-FDHOLDER-STORE(8) of the System Manager's Manual. mwah, go store some descriptors πŸ’‹πŸ’–
πŸ“¦ where this page comes from