.\" Generated by scdoc 1.11.3 .\" 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-10-13" .PP .SH NAME .PP pipectl - a simple named pipe management utility .PP .SH SYNOPSIS .PP \fBpipectl\fR [-h,-o,-i,-n N,-p P,-f,-l] .PP .SH DESCRIPTION .PP \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.\& .PP \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: .PP .RS 4 $ pipectl -o | daemon-process .PP $ echo "do-the-thing --color red" | pipectl -i .PP $ echo "quit" | pipectl -i .PP .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.\& .PP When the daemon process exits or closes its stdin, \fBpipectl\fR will clean up and remove the created named pipe automatically.\& .PP .SH OPTIONS .PP \fB-h, --help\fR .RS 4 Show help message and exit.\& .PP .RE \fB-o, --out\fR .RS 4 Create a named pipe and print its contents to stdout.\& .PP .RE \fB-i, --in\fR .RS 4 Write stdin to an open named pipe created with \fB-o\fR.\& .PP .RE \fB-n N, --name N\fR .RS 4 Create named pipe with a custom name.\& See \fBPATHS\fR.\& .PP .RE \fB-p P, --path P\fR .RS 4 Create a names pipe at a custom path.\& See \fBPATHS\fR.\& .PP .RE \fB-f, --force\fR .RS 4 Force overwrite an existing named pipe event if it already exists (only usable with \fB-o\fR).\& .PP .RE \fB-l, --lock\fR .RS 4 Use \fBflock\fR(2) to synchronize writes to the pipe (only usable with \fB-i\fR).\& .PP .RE .SH PATHS .PP By default, \fBpipectl\fR will create the named pipe in a temporary directory (\fBTMP\fR).\& The first available directory of these will be used: .PP .PD 0 .IP \(bu 4 \fB$XDG_RUNTIME_DIR\fR .IP \(bu 4 \fB$TMPDIR\fR .IP \(bu 4 /tmp .PD .PP The resulting path of the named pipe is as follows: .PP \fBdefault\fR .RS 4 \fBTMP\fR/pipectl.\&\fBUID\fR.\&pipe .PP .RE \fBwith --name NAME\fR .RS 4 \fBTMP\fR/pipectl.\&\fBUID\fR.\&\fBNAME\fR.\&pipe .PP .RE \fBwith --path PATH\fR .RS 4 \fBPATH\fR .PP .RE where \fBUID\fR is the real user id of the \fBpipectl\fR process (see \fBgetuid\fR(3)).\& .PP .SH AUTHORS .PP Maintained by Ferdinand Bachmann .\& More information on \fBpipectl\fR can be found at .\& .PP .SH SEE ALSO .PP \fBpipectl\fR(1) \fBmkfifo\fR(1) \fBflock\fR(2) \fBgetuid\fR(3)