linux - :(){ :|:& };: Forkbomb?

标签 linux shell scripting

<分区>

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

:(){ :|:& };:

无限制地运行这个 fork() .. 可以解释一下这个 bash 脚本吗?

最佳答案

您定义了一个名为: 的函数。在该函数中,您调用该函数两次 (:|:),然后将该过程发送到后台 (&)。然后你终于在最后调用它。

由于递归的性质,您将继续 fork 。由于没有基本情况,递归永远不会结束。

关于linux - :(){ :|:& };: Forkbomb?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3333631/

相关文章:

linux - 如何将值发送到 Zenity 进度条

bash - 错误 : Tar command not found

linux shell 脚本 : getting filename from a user input string

php - php 中 javascript 的延迟加载

c - 如何在 Linux 中创建一个系统调用来清理页面缓存?

linux - 查找、舍入和开始

linux - 了解 rtc_interrupt 中的代码

python - 查找两个占位符之间的所有内容并将其替换为变量的内容

Python --command 命令行选项

linux - 想要从具有页眉页脚的文件中获取分隔数据,以便进行数据处理以进行性能分析