pipectl - a simple named pipe management utility
Contents
Description
pipectl is a tool to create and manage short-lived named pipes that can be used to feed stdin to a
longer-lived program from elsewhere in the system without needing a complex IPC mechanism such as UNIX
domain sockets.
pipectl is intended to be used in pairs, one call to pipectl opens the pipe (-o) and feeds it to a
process, and all others with the same name or path will write to the stdin of that process:
$ pipectl -o | daemon-process
$ echo "do-the-thing --color red" | pipectl -i
$ echo "quit" | pipectl -i
The daemon process process will never observe an EOF on its stdin. pipectl will instead block until
another input pipe (-i) is openend and will then feed the stdin of that process to the daemon process
asynchronously.
When the daemon process exits or closes its stdin, pipectl will clean up and remove the created named
pipe automatically.
Name
pipectl - a simple named pipe management utility
Options
-h,--help
Show help message and exit.
-o,--out
Create a named pipe and print its contents to stdout.
-i,--in
Write stdin to an open named pipe created with -o.
-nN,--nameN
Create named pipe with a custom name. See PATHS.
-pP,--pathP
Create a names pipe at a custom path. See PATHS.
-f,--force
Force overwrite an existing named pipe event if it already exists (only usable with -o).
-l,--lock
Use flock(2) to synchronize writes to the pipe (only usable with -i).
Paths
By default, pipectl will create the named pipe in a temporary directory (TMP). The first available
directory of these will be used:
• $XDG_RUNTIME_DIR
• $TMPDIR
• /tmp
The resulting path of the named pipe is as follows:
defaultTMP/pipectl.UID.pipe
with--nameNAMETMP/pipectl.UID.NAME.pipe
with--pathPATHPATH
where UID is the real user id of the pipectl process (see getuid(3)).
See Also
pipectl(1) mkfifo(1) flock(2) getuid(3) 2025-03-01 pipectl(1)
Synopsis
pipectl [-h,-o,-i,-n N,-p P,-f,-l]
