Pipe-calculus: Difference between revisions

Line 202: Line 202:


A [[Wikipedia:Pipeline_(Unix)|pipeline]] in Unix shell programming is a good analogy for the pipe combinator. Piped programs execute concurrently. In <math>P1 | P2</math> it cannot occur that the output of <math>P1</math> directly reaches the output of the pipeline.
A [[Wikipedia:Pipeline_(Unix)|pipeline]] in Unix shell programming is a good analogy for the pipe combinator. Piped programs execute concurrently. In <math>P1 | P2</math> it cannot occur that the output of <math>P1</math> directly reaches the output of the pipeline.
Unix processes can handle more than one input and output streams, but only the standard input and output streams are passed on through the pipe.
If <math>P1</math> exits, <math>P2</math> continues to run, but if <math>P2</math> exits, <math>P1</math> will exit too<ref>The process will exit next time when it writes to its <code>stdout</code>, at least if the default <code>SIGPIPE</code> handler is not replaced by the user.</ref>.
Although Unix processes can handle multiple input and output streams, only the standard input and output streams are passed on through the pipe.


==== Recognition and interpretation ====
==== Recognition and interpretation ====
283

edits