S6-FDHOLDER-RETRIEVE(8)

πŸ“¦ version 2.15.1.0, in nixpkgs unstable

πŸ’– 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 to s6-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 in s6-fdholder-error-codes(7).
  • 100 β€” wrong usage.
  • 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-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 πŸ”₯

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