linux 中的 strace init 进程 (PID 1)

strace init process (PID 1) in linux

strace manpage 说:

On Linux, exciting as it would be, tracing the init process is forbidden.

我检查了一样,它不允许:

$  strace -p 1
attach: ptrace(PTRACE_ATTACH, ...): Operation not permitted

为什么不可能?甚至 ptrace 联机帮助页也对跟踪 init 进程说了同样的话。这些工具不安全,或者只是 init 进程被认为太特殊以至于没有其他进程 (strace/ptrace) 可以向它发出信号。

sudo strace -p 1 对我有用(strace 需要 root 权限)
work to allow debugging of init. In 2.4.37 you can't attach to init, but in some kernel this condition was removed - I've found 3.8 kernel

编辑:在我的 Kubuntu 15.10 上 strace man 中没有 On Linux, exciting as it would be, tracing the init process is forbidden.。更新的人?