1

I understand the basic syntax of this famous fork bomb : ( ) { : | : & } ; : but I am currently struggling to understand the part of : | :, where one pipes the output of : to another :.

What I do not understand is simply that since the function :() takes no parameters and returns nothing when called, how can one pipe its output (what output is it?) to another copy of the same function? Thank you for your time and help!

1 Answers1

1

The point of the pipe is simply to start new processes faster: the shell (at least, most shells nowadays) starts both sides of a pipe simultaneously. Whether processes input or output anything is of no concern to the shell when it sets the pipe up.

Stephen Kitt
  • 434,908
  • Thanks for your help, Stephen. I fear I still do not understand the purpose of :|:. If the output of the first fork bomb has no effect on the process after the pipe, then why don't we just ignore it and write it as : ( ) { :& } ; :? – Nahua Kang Nov 18 '16 at 14:36
  • With { : | : & }, every time : is run you get two more processes, which is what makes this a runaway. { : & : & } might be close but I haven't tested that. – Stephen Kitt Nov 18 '16 at 14:42