s6: the s6-fdholder-retrievec program
Keywords: s6 s6-fdholder fd-holding fd-holder fd retrieval unix socket activation

s6
Software
skarnet.org

# The `s6-fdholder-retrievec` program

`s6-fdholder-retrievec` talks to a fd-holding daemon on its open descriptors 6 and 7, and retrieves a file descriptor from it, then executes a program.

## Interface

         s6-fdholder-retrievec [ -D ] [ -t timeout ] id prog...

- s6-fdholder-retrievec expects to talk to a listening s6-fdholderd program on its descriptors 6 and 7.
- 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.

## Options

- `-D` : delete 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.
- `-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.

## Notes

- s6-fdholder-retrievec is the "internal" version of s6-fdholder-retrieve. It simply expects to be run as a UCSPI client, i.e. talking to the server over descriptors 6 and 7, instead of connecting to the server itself.
- The error messages for the s6-fdholder suite are explained here.