To compare with diff
adjacent records from a file, I created two FIFOs, forked children to supply their write ends, and captured the output of
diff -ub $previous $current
where the scalars contain the FIFOs’ paths—kind of how bash
process substitution works.
This is not a program that needs to be bullet-proof, but if it were, how would I create temporary FIFOs so as to avoid race conditions and other vulnerabilities? Imagine File::Temp
has a File::Temp::FIFO
cousin: what would be the latter's implementation?