Use single fprintf in verror_msg()

This change partially reverts commit 44d0532.

In code before commit 44d0532, single fprintf was used on purpose:
we want to send entire message as one write() call. Since stderr
is unbuffered, separate fprintf's to it always result in separate
writes, they are not coalesced. If we aren't the only program
which writes to this particular stderr, this may result
in interleaved messages.

Since this function is not performance critical, I guess
it's ok to make it less efficient.

* strace.c (verror_msg): Attempt to print the message in single
write operation. Use separate fprintfs as a fallback if malloc fails.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
1 file changed