发布于 2011-04-20 13:54:47
这是一个叉形炸弹
发布于 2011-04-20 14:00:51
以下是维基百科(炸弹)的简短解释:
:() # define ':' -- whenever we say ':', do this:
{ # beginning of what to do when we say ':'
: # load another copy of the ':' function into memory...
| # ...and pipe its output to...
: # ...another copy of ':' function, which has to be loaded into memory
# (therefore, ':|:' simply gets two copies of ':' loaded whenever ':' is called)
& # disown the functions -- if the first ':' is killed,
# all of the functions that it has started should NOT be auto-killed
} # end of what to do when we say ':'
; # Having defined ':', we should now...
: # ...call ':', initiating a chain-reaction: each ':' will start two more.基本上是一个递归函数,每次重复调用都会产生两个进程。因此,过程的数量呈指数增长。
https://stackoverflow.com/questions/5731435
复制相似问题