Hacker News new | ask | show | jobs
by Taniwha 896 days ago
strace works on anything that makes a system call - written in any language
1 comments

Except it doesn't work on programs that call strace.
Why not? A simple "strace strace date" works on my machine.
Ok, well this used to be not the case.
It's always been the case, as far as I know. You may be thinking of the fact that you can't ptrace a process that's already being ptraced, which includes processes that are ptracing themselves.
Doesn't strace use the ptrace() system call under the hood?
Correct, which is why I'm mentioning it here. Stracing another instance of strace does not involve any of the processes ptracing themselves, though, and I don't think it ever has.