66

Software

obarun.org

fdholder

Manages the fdholder daemon of a scandir and the file descriptors it keeps.

Interface

fdholder [ -h ] [ -o owner ] start|stop|restart|store|retrieve|list [<subcommand options>]

The fdholder (66-fdholderd) is a daemon supervised by the scandir. It holds open file descriptors on behalf of services so they survive a service restart — typically the read end of a logging fifo. This command controls that daemon and the descriptors it stores.

This command expects an already running scandir for the relevant owner.

Options

Subcommands

start, stop, restart

store id

retrieve id prog…

list

Usage examples

Start the fdholder daemon of the current owner’s scandir

66 fdholder start

Store standard input under the name mylog, keeping it forever

66 fdholder store mylog

Store file descriptor 3 under the name mylog, expiring after one hour

66 fdholder store -d 3 -e 3600 mylog

Retrieve mylog on standard input and exec a logger, deleting the entry afterwards

66 fdholder retrieve -D mylog 66-log -- /var/log/mylog

List the stored descriptors of owner’s fdholder

66 fdholder -o owner list