]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/common: EINTR/unchecked return fix
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 4 Feb 2011 12:42:01 +0000 (04:42 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 4 Feb 2011 12:42:01 +0000 (04:42 -0800)
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/tools/common.cc

index 35e030b79d8bffde89f1a06508ecbee1cec1266f..de9c08eff3602d7f73d9bfe0101b07d59b2081ca 100644 (file)
@@ -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 {