Various Tools
diewithparent
Execute a command that receives a signal (SIGTERM by default) when its parent process dies. Useful for ensuring that a program terminates along with its parent.
Download C Source: diewithparent.c (Linux only - uses prctl syscall)
Compile with: cc -o diewithparent diewithparent.c
Usage: diewithparent [-s SIGNUM] COMMAND [ARGS ...]
with-fuse
Launch the program specified on the command line with gid fuse and in a separate mount namespace such that any mounts created by this process (or its descendants) are not visible to other processes.
For more information, see Easily Running FUSE in an Isolated Mount Namespace.
Download C Source: with-fuse.c
See comment at start of source code for compilation and usage instructions.
adjmtimes
Adjust the modtime by a given offset on one or more files. I use it to fix the modtimes on photos that are copied from a camera with a skewed clock.
Download C Source: adjmtimes.c
Compile with: cc -o adjmtimes adjmtimes.c
Usage: adjmtimes OFFSET FILES ... (OFFSET is specified in seconds and may be negative)
xdmcpstatus
Test whether XDMCP is willing to accept queries on the local host. Useful for testing health of a display manager such as XDM or GDM.
Download C Source: xdmcpstatus.c
Compile with: cc -o xdmcpstatus xdmcpstatus.c