1

このコマンドがどこかに投稿されているのを見ましたが、:(){ :|:& };:

UNIX で実行したらどうなるでしょうか

4

2 に答える 2

4

これはフォーク爆弾であり、非常に悪いです。

多くのプロセスが生成され、各プロセスがさらに 2 つ生成されると、その数は指数関数的に増加します。倒れるまでシステムを詰まらせます。

于 2012-07-18T03:16:05.147 に答える
2

実行しないでください。そのフォーク爆弾。システムがダウンします。

ウィキペディアから:

 /- Define the function ':' without any parameters '()' as follows:
 | /- Beginning of function-block.
 | | /- Load a copy of the function ':' into memory ...
 | | |/- ... and pipe its output to ...
 | | ||/- ... another copy of the ':'-function, which has to be loaded into memory.
 | | |||   (In other words, ':|:' loads two more copies of ':', thus causing a chain-reaction)
 | | |||/- Disown the functions (make them a background process), so that the children of a parent
 | | ||||  will not be killed when the parent gets auto-killed.
 | | |||| /- End of function-block.
 | | |||| |/- End of definition. 
/-\| |||| ||/- Execute the function ':'.  The chain-reaction begins.
:(){ :|:& };:

ここにリンクがありますhttp://en.wikipedia.org/wiki/Fork_bomb

于 2012-07-18T03:18:01.410 に答える