Hacker News new | ask | show | jobs
by mandarg 3489 days ago
Tangentially, there's a funny Easter Egg in strace – with some trial and error, you can get it to strace its own pid.

  $ strace -p 957 strace: I'm sorry, I can't let you do that, Dave.
1 comments

let z=$(readlink /proc/self)+1 && strace -p $z

probably a race. i'm not a real programmer.

  sh -c 'exec strace -p $$'
This is race-free and POSIX-compliant I think.