This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Overriding *fprintf with an LD_PRELOAD


Hi,

I'm trying to do some simple logging with an LD_PRELOAD library.  I'd like
to intercept all the reads and writes done by a program.  However,
I'm running into trouble with vfprintf -- it refuses to be overridden.
I had hoped that overriding write/write64 would take care of this case,
but I see that all the internal glibc writes are done via __write.
I tried overriding vfprintf and _IO_vfprintf, but was unsuccessful.
Can anyone point me in the right direction to intercept vfprintf?

Thank you,
Emil Ong

P.S.
I posted this earlier to bug-glibc, but then I saw that this list 
(libc-alpha) is also for user discussion.  I apologize if either
or both of these posts is misplaced.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]