I suspect this needs to be in a WARNING section of the printf(3) man page. The print functions that use variable arguments modify the argument list so that only one can be called. For example, to print the arguments and also write them to a file using the following code will cause a segmentation violation:
vprintf (fd, fmt, args);
vsnprintf (buf, sizeof(buf), fmt, args);
Switching the order of the calls doesn’t eliminate the segmentation violation. You have to do something on the order of:
vsnprintf (buf, sizeof(buf), fmt, args);
fprintf (fd, “%s”, buf);