fdtools is a set of utilities for working with file descriptors. With these tools, you can examine and manipulate file descriptor properties from shell scripts, where without them you might have resorted to a different language. These tools can rewind file descriptors, switch them between blocking and nonblocking mode, and examine their inode information. On some systems (currently only Linux, as far as I know) they can also allocate, lock, and switch virtual consoles.
This package is discussed on the prjware list. New releases are announced on the prjware-announce list.
fdtools is devoid of warranty and is distributed under the GNU General Public License, version 2. But that doesn't mean it's necessarily a good idea for you to distribute modified versions. (That includes repackaging.) I'd like to know if you plan to do that.
This link always points to the latest version (currently 2024.12.07).
Older versions are published for historical interest.
You can get the latest development sources with:
$ git clone git://git.dogmap.org/fdtools.git
To build fdtools, you need Laurent Bercot's
skalibs
package. Edit conf-compile/depend_*
as necessary during
installation.
slashpackage is a good thing. You can
read more about it
here. If you don't already have /package
, create it (on any
filesystem you like, as long as it's accessible by the name
“/package
”):
# mkdir -p /usr/local/package # ln -s /usr/local/package / # chmod +t /package/.
Then run sp-install
:
# sp-install fdtools-VERSION.tar.bz2
Or, if you like to do things manually, unpack the tarball and run
package/install
:
# cd /package # bunzip2 < /path/to/fdtools-VERSION.tar.bz2 | > tar -xpf - # cd misc/fdtools-VERSION # package/install
Read package/README
and package/INSTALL
for
more detailed instructions.
grabconsole
program
redirects console messages to a pseudoterminal.
multitee
program writes data
from multiple inputs to multiple outputs.
pipecycle
program runs a set
of commands connected cyclically by pipes.
recvfd
program receives file
descriptors passed over a socket.
seek0
program rewinds a
file descriptor.
sendfd
program passes file
descriptors over a socket.
setblock
program makes
a file descriptor blocking or nonblocking.
setstate
program modifies its
process state and executes a given command.
statfile
program sets
environment variables according to a file's inode data and
executes the given command.
vc-get
program allocates a
virtual console.
vc-lock
program locks the
console.
vc-switch
program activates a
given virtual console.
None.
iopause
library.