On 14/01/10 21:12, Yang Zhang wrote:
Just out of curiosity: libstdubf.c defines fileno_to_name, apply_mode,
and stdbuf for LD_PRELOAD-ing, but AFAICT these aren't defined in
glibc; where are they called from?

Notice the __attribute__ ((constructor)) on libstdbuf::stdbuf().
That means that function will be called before main() on any
program that preloads it. The lib is not meant to be used directly
really, and instead the stdbuf program sets things up appropriately.

cheers,
Pádraig.


Reply via email to