Answer the question
In order to leave comments, you need to log in
Why does this code hang Linux
Good time of the day.
Here in this topic , the author describes the "fork bomb"
and gives an example of code that "hangs" the server. Can anyone explain why the code
echo '. ./_&. ./_&'>_;. ./_
works this way.
Thank you.
Answer the question
In order to leave comments, you need to log in
this code writes a file _
with content
. ./_&. ./_&
and runs it in the current shell (. filename). the file itself calls itself twice as a background job and so recursively.
Can you be more specific about which part of the code is responsible for what?
Does not hang, but eats up all resources. The system actually works but is so slow that it seems to be hanging.
On systems with properly configured ulimits nothing will happen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question