好的,所以有人"挑战"我将其输入我的OSX终端,但我不知道它会做什么:
警告读者:以下行可能有害; 千万不要除非你知道自己在做什么,输入:
:(){ :|:& };:
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
rea*_*n93 11
打破命令,这实际上是可以理解的:
:() #Define new function
#named ':'
{ #Begin function definition
#block
:|:& #Pipe the very ':' function through itself,
#creating two processes, and make the
#resulting copy run in the background
#(the & part)
} #End function definition block
;: #Call ':' for the first time, initiating a chain
#reaction: each instance of ':' will create two
#more instances, ad infinitum
Run Code Online (Sandbox Code Playgroud)
再说一次,根据我的经验,Mac OS X碰巧有一个人可以执行的进程数量的每用户限制,所以除非你真的有勇气在一个sudo -s或一个sudo -ishell 下运行fork炸弹,你应该没问题.