I think you're looking at the wrong layer. The logic in vfprintf
is responsible for formatting its arguments and writing them through the underlying stdio functions, usually into a buffer in the FILE
object it's targetting. The actual logic for getting this output to the file descriptor (or on other non-POSIX-like systems, the underlying device/file representation) is probably in fwrite
, fputc
, and/or some __
-prefixed internal functions (perhaps __overflow
).