0

If I have a long-running executable producing output - like make - piped into another executable, does the second executable get called once or repeatedly?

make | my_exec

I would accept a link explaining in depth how pipes work

Bob
  • 4,576
  • 7
  • 39
  • 107
  • 1
    Does this answer your question? [What is a simple explanation for how pipes work in Bash?](https://stackoverflow.com/questions/9834086/what-is-a-simple-explanation-for-how-pipes-work-in-bash) – P.... Feb 05 '20 at 22:34
  • 1
    It gets called just once and keeps reading what it receives down the pipe till the input stops. – Mark Setchell Feb 05 '20 at 22:39

1 Answers1

1

The second executable is called once. It keeps reading the input until the first executable stops.

pipes basically just connect the STDOUt of one process to the STDIN of the next process.

CoffeeTableEspresso
  • 2,614
  • 1
  • 12
  • 30