.\" Generated by scdoc 1.11.2 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "pipectl" "1" "2024-03-23" .P .SH NAME .P pipectl - a simple named pipe management utility .P .SH SYNOPSIS .P \fBpipectl\fR [-h,-o,-i,-n N,-p P,-f,-l] .P .SH DESCRIPTION .P \fBpipectl\fR 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.\& .P \fBpipectl\fR is intended to be used in pairs, one call to \fBpipectl\fR opens the pipe (\fB-o\fR) and feeds it to a process, and all others with the same name or path will write to the stdin of that process: .P .RS 4 $ pipectl -o | daemon-process .P $ echo "do-the-thing --color red" | pipectl -i .P $ echo "quit" | pipectl -i .P .RE The daemon process process will never observe an EOF on its stdin.\& \fBpipectl\fR will instead block until another input pipe (\fB-i\fR) is openend and will then feed the stdin of that process to the daemon process asynchronously.\& .P When the daemon process exits or closes its stdin, \fBpipectl\fR will clean up and remove the created named pipe automatically.\& .P .SH OPTIONS .P \fB-h, --help\fR .RS 4 Show help message and exit.\& .P .RE \fB-o, --out\fR .RS 4 Create a named pipe and print its contents to stdout.\& .P .RE \fB-i, --in\fR .RS 4 Write stdin to an open named pipe created with \fB-o\fR.\& .P .RE \fB-n N, --name N\fR .RS 4 Create named pipe with a custom name.\& See \fBPATHS\fR.\& .P .RE \fB-p P, --path P\fR .RS 4 Create a names pipe at a custom path.\& See \fBPATHS\fR.\& .P .RE \fB-f, --force\fR .RS 4 Force overwrite an existing named pipe event if it already exists (only usable with \fB-o\fR).\& .P .RE \fB-l, --lock\fR .RS 4 Use \fBflock\fR(2) to synchronize writes to the pipe (only usable with \fB-i\fR).\& .P .RE .SH PATHS .P By default, \fBpipectl\fR will create the named pipe in a temporary directory (\fBTMP\fR).\& The first available directory of these will be used: .P .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB$XDG_RUNTIME_DIR\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} \fB$TMPDIR\fR .RE .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .IP \(bu 4 .\} /tmp .RE .P The resulting path of the named pipe is as follows: .P \fBdefault\fR .RS 4 \fBTMP\fR/pipectl.\&\fBUID\fR.\&pipe .P .RE \fBwith --name NAME\fR .RS 4 \fBTMP\fR/pipectl.\&\fBUID\fR.\&\fBNAME\fR.\&pipe .P .RE \fBwith --path PATH\fR .RS 4 \fBPATH\fR .P .RE where \fBUID\fR is the real user id of the \fBpipectl\fR process (see \fBgetuid\fR(3)).\& .P .SH AUTHORS .P Maintained by Ferdinand Bachmann .\& More information on \fBpipectl\fR can be found at .\& .P .SH SEE ALSO .P \fBpipectl\fR(1) \fBmkfifo\fR(1) \fBflock\fR(2) \fBgetuid\fR(3)