

















但问题是:
cp /usr/bin/bash /usr/bin/xxxxbash
mkfifo /tmp/test-fifo
xxxxbash < /tmp/test-fifo
另开一个窗口:
ps -ef | grep bash
仍然看不到 xxxxbash
cat /proc/bash-id/status 里面的信息,发现第一行:
Name: bash
我猜测这是被硬编码了。
对比一下:
cp /usr/bin/tail /usr/bin/xxxxtail
xxxxtail -f /tmp/test-fifo
另开一个窗口:
watch -n 1 "ps -ef | grep tail"
这下子能看到 xxxxtail 了,并且:
cat /proc/xxxxtail-id/status
第一行 Name 被正确改为 xxxxtail
所以,这 bash 在 proc 的 status 的 name ,是个硬编码的 bug 吧?
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。