Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 1.01 KB

README.md

File metadata and controls

23 lines (15 loc) · 1.01 KB

setbufsize.so Linux Build Status

LD_PRELOAD library for controlling standard stream buffer sizes.

You can grab prebuilt 32- and 64-bit binaries from the Releases tab. These are built by Travis on a CentOS 5 Docker image, so they should "just work" on any Linux distribution newer than that.

Example Usage

For instance, if you wished to set the stdout of a program app to be unbuffered when connected to a terminal (rather than the default line-buffering), the invocation would be:

$ LD_PRELOAD=/path/to/setbufsize64.so STDOUT_BUFFER_SIZE=0 ./app

STDERR_BUFFER_SIZE does the obvious thing, for stderr.

Caveats

Due to its nature as an LD_PRELOAD object, setbufsize requires the target program to use libc for its output, and furthermore be dynamically linked.