4 ms·
This actually doesn't work for processes using stderr on eglibc 2.13 - fprintf internally outputs via a different path that can't be hooked in this manner. On x
by bdonlan 15y ago
This actually doesn't work for processes using stderr on eglibc 2.13 - fprintf internally outputs via a different path that can't be hooked in this manner. On x86, you could try overwriting the system call gate pointer to a hook function, but on x86_64 you're basically stuck, unless you attach a debugger or something.
Also, the write prototype is incorrect (using int instead of size_t) and could break on 64-bit machines.
- sickill 15y agoThx, will fix int -> size_t.