Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

isn't this more or less the same as

    gdb -batch -n -ex 'call chdir("whatever")' -p $$


That does seem to be conceptually pretty much what it's doing. Except your version works on more architectures.

It's a simple example of ptrace() though.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: