From 2aabb909d832a0c123c6dbabd431c280a1e0b4aa Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Thu, 10 Feb 2011 07:09:24 -0800 Subject: [PATCH] tools/common: use fwrite to write stdout Signed-off-by: Colin McCabe --- src/tools/common.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/common.cc b/src/tools/common.cc index de9c08eff3602..a6a1ff069c8ed 100644 --- a/src/tools/common.cc +++ b/src/tools/common.cc @@ -450,7 +450,7 @@ int run_command(const char *line) bufferlist in; if (cmd.size() == 1 && cmd[0] == "print") { *g.log << "----" << std::endl; - TEMP_FAILURE_RETRY(::write(1, in.c_str(), in.length())); + fwrite(in.c_str(), in.length(), 1, stdout); *g.log << "---- (" << in.length() << " bytes)" << std::endl; return 0; } @@ -478,7 +478,7 @@ int run_command(const char *line) if (outfile) { if (strcmp(outfile, "-") == 0) { *g.log << "----" << std::endl; - TEMP_FAILURE_RETRY(::write(1, in.c_str(), in.length())); + fwrite(in.c_str(), in.length(), 1, stdout); *g.log << "---- (" << in.length() << " bytes)" << std::endl; } else { -- 2.39.5