From: Colin Patrick McCabe Date: Fri, 4 Feb 2011 12:42:01 +0000 (-0800) Subject: tools/common: EINTR/unchecked return fix X-Git-Tag: v0.25~220^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5be24ee2c0f369865e3303ccdbb82d346a8e71ab;p=ceph.git tools/common: EINTR/unchecked return fix Signed-off-by: Colin McCabe --- diff --git a/src/tools/common.cc b/src/tools/common.cc index 35e030b79d8b..de9c08eff360 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; - write(1, in.c_str(), in.length()); + TEMP_FAILURE_RETRY(::write(1, in.c_str(), in.length())); *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; - write(1, in.c_str(), in.length()); + TEMP_FAILURE_RETRY(::write(1, in.c_str(), in.length())); *g.log << "---- (" << in.length() << " bytes)" << std::endl; } else {