Hacker News new | ask | show | jobs
by 10000truths 16 days ago
> The UNIX pipe has the (for many systems) undesirable negative property of losing data in the pipe when the receiving process terminates: Anything in the kernel buffer of the pipe gets lost.

There are solutions for that, though:

* You can observe and/or persist intermediate data with `tee`

* You can use a named pipe, whose lifetime is bound to an inode instead of the processes

* You can dup the read end of the pipe and pass the extra file descriptor to a crash handler process

None of these are esoteric. You do need a basic understanding of Unix primitives, but any half-decent computer science course will cover them.