]> xenbits.xensource.com Git - livepatch-build-tools.git/commit
common.h: Flush stdout before writing to stderr
authorMihails Strasuns <mstrasun@amazon.com>
Thu, 19 Jan 2023 10:13:02 +0000 (10:13 +0000)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Mon, 20 Feb 2023 11:25:14 +0000 (11:25 +0000)
commitdb0654e740d96e8a2df36b8b0ecdc9edf26a74c3
tree680d5852cfb5b1819ab486cfc95c26d9ce191cbb
parentb685eec86aa58f6c0c644e250b29dca626a3bd8d
common.h: Flush stdout before writing to stderr

Flush existing debug messages before writing an error to stderr.  stderr
is usually unbuffered and stdout is usually buffered. This results in
odd looking output when an error occurs and both stderr/stdout are
printed on the same console/file. More precisely, the error message is
printed in the middle of previously emitted debug messages.

Signed-off-by: Michael Kurth <mku@amazon.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
common.h