I was looking at the fork bomb on Wikipedia, and the batch examples were:
%0|%0
OR
:here
start ''your fork bomb name''.bat
goto here
OR
:here
start %0
goto here
I understand the second two, they start another instance of themselves and then repeat, but I don't understand the first. I read that the pipeline executes the file to the right with the output of the file to the left. Why can't the fork bomb just be:
%0
I would assume that this would call itself, but then terminate instantly, but why wouldn't %0|%0
also terminate? Even though the new instance is going to keep making new instances, isn't the first done after starting the second? What makes the first one continue?
edit: Does it loop because none of the instances can terminate until their recursive call is returned? Does this mean it only ever calls the first %0
?