开发者

:(){ :|:& };: Forkbomb? [duplicate]

开发者 https://www.devze.com 2023-01-09 01:23 出处:网络
This question already has answers here: Closed 12 开发者_开发问答years ago. Possible Duplicate: The following bash command will spawn processes to kernel death. Can you explain the syntax?
This question already has answers here: Closed 12 开发者_开发问答years ago.

Possible Duplicate:

The following bash command will spawn processes to kernel death. Can you explain the syntax?

:(){ :|:& };:

running this fork() unlimited .. Can one please explain this bash script ?


You define a function called :. Inside this function you call this function twice (:|:) and then you send that process to the background (&). Then you finally call it at the end.

Because of the recursive nature, you'll keep forking. Since there is no base case, the recursion will never end.

0

精彩评论

暂无评论...
验证码 换一张
取 消