I am using LD_PRELOAD to capture the write () system call in linux. I can successfully do this to write a system call and make it work.
But when I call printf (), this time does not work. If we observe the printf stack trace using strace, I find that at the end printf calls write () the system call to write to the console, but at that time my write () system call is not called until the write () system call is actually called.
Does anyone know why this is happening?
source
share