s6: the s6-fdholder-listc program
Keywords: s6 s6-fdholder fd-holding fd-holder fd list unix socket activation

s6
Software
skarnet.org

# The `s6-fdholder-listc` program

`s6-fdholder-listc` talks to a fd-holding daemon on its open descriptors 6 and 7. It prints on stdout the list of identifiers of all the fd currently held by the daemon, one per line.

## Interface

         s6-fdholder-listc [ -t timeout ]

- s6-fdholder-listc expects to talk to a listening s6-fdholderd program on its descriptors 6 and 7.
- It gets the list of identifiers corresponding to the currently held file descriptors. It prints that list to stdout, one per line.
- It then exits 0, or 1 if the server returned an error.

## Options

- `-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-listc is the "internal" version of s6-fdholder-list. 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.
- The list of identifiers is printed one per line; special characters - such as newline - are quoted. The output can be unquoted, for instance, by `s6-unquote-filter -d ""`.