<URL:https://code.dogmap.org./fdtools/>
fdtools is a set of tools for working with file descriptors.

See package/INSTALL for general package installation instructions.  If you
like, after installing the package, you can delete the src/ directory and
make the remaining files read-only; none of the programs need to read src/
files or modify anything in the package directory.

To build fdtools, you need the skalibs package:
<URL:https://skarnet.org/software/skalibs/>
If skalibs is installed in a location where your compiler and linker don't
look by default, edit conf-compile/host_compile.sh and
conf-compile/host_link.sh to add the necessary -I and -L flags.  skalibs
installs its static and shared libraries in separate directories, so you can
control which one fdtools links to by giving the appropriate -L flag.

On Solaris, you need to add "-lsocket" at the end of the gcc command line in
conf-compile/host_link.sh.

There are some expected diagnostics when building fdtools: some nsec-* and
vc-* files may fail to compile, and statfile.c may give warnings about
comparison of signed values to unsigned values.

The grabconsole program redirects console messages to a pseudoterminal.

The multitee program multiplexes I/O among a set of file descriptors.

The pipecycle program runs one or more commands connected by pipes.

The seek0 program rewinds a file descriptor.

The setblock program makes a file descriptor blocking or nonblocking.

The statfile program sets environment variables according to a file's inode
data and executes the given command.

The vc-get program allocates a virtual console, similar to the ptyget
program.

The vc-lock program locks the console.

The vc-switch program activates a given virtual console.

The fdtools.a library provides grabconsole, seek0, and setblock as C
functions.
