bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does stdbuf work?


From: Pádraig Brady
Subject: Re: How does stdbuf work?
Date: Fri, 15 Jan 2010 09:28:41 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

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

[Prev in Thread] Current Thread [Next in Thread]