s6: the s6-fdholder-setdump program
Keywords: s6 s6-fdholder fd-holding fd-holder fd dump storage unix socket activation

s6
Software
skarnet.org

# The `s6-fdholder-setdump` program

`s6-fdholder-setdump` connects to a fd-holding daemon listening on a Unix domain socket, and dumps a set of file descriptors into that daemon.

## Interface

         s6-fdholder-setdump [ -t timeout ] path

- s6-fdholder-setdump executes into `s6-ipcclient path s6-fdholder-setdumpc id`. It does nothing else: it is just a convenience program. The s6-ipcclient program connects to a Unix socket at path, and the s6-fdholder-setdumpc program transmits the file descriptors over the socket.
- It should be used to connect to a s6-fdholderd daemon, which will store the set of file descriptors.

## 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 (connecting to the wrong socket, for instance).

## Notes

- The file descriptors to transmit to the server should of course be already open in the s6-fdholder-setdump program; also, s6-fdholder-setdump should have certain environment variables that describe that set of file descriptors. The format of the environment is the same as the one set by s6-fdholder-getdumpc.
- Getting the whole state of a s6-fdholderd daemon requires specific privileges. Make sure you properly configure the s6-fdholderd access rights so your client can perform that operation.