fopen() calls __open()

Derrell.Lipman@UnwiredUniverse.com Derrell.Lipman@UnwiredUniverse.com
Thu Apr 27 21:04:00 GMT 2006


Ulrich Drepper <drepper@redhat.com> writes:

> Derrell.Lipman@UnwiredUniverse.com wrote:
>> What can I do to cause fopen() in glibc to call the open() or _open() or
>> __open() in the preload instead of the internal __open?
>
> Nothing.  Once a call enters glibc it won't leave it until it's down.
> Exceptions: the malloc functions.  Everything is completely opaque and
> that won't change.

Ok.  Thanks for the response.

I'm a bit confused as to why certain functions are weak and allowed to be
overridden (e.g. open, __open) but not higher-level functions that use them.
It seems a bit inconsistent, but I assume there's a reason.  If there's some
prior thread that explains this, I'd sure appreciate a pointer to it.
Otherwise, might you be able to explain why primitives can be overridden but
not such that the users of those primitives within the library use the
overridden versions?

Thanks!

Derrell



More information about the Libc-alpha mailing list