]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "cfuse.cc: use safe_write"
authorGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 3 Jun 2011 21:29:35 +0000 (14:29 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Fri, 3 Jun 2011 21:29:35 +0000 (14:29 -0700)
This reverts commit e8ac5aa2a4c4e3ce84ed553dbebfb1cccf5679a9.

This commit is just erroneous. It adds checks on a pipe write
for the result and an abort if the write failed. But that's broken
in the desired case where we succeed, block on ceph_fuse_ll_main(),
and the parent process is long-gone by the time we get to this code!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/cfuse.cc

index 5d063c652bb6f6261ece7c523df06c10235816f5..d1fa3f2bcc33ddfcfb7ed344be9ec45877e10f0a 100644 (file)
@@ -29,7 +29,6 @@ using namespace std;
 #include "common/Timer.h"
 #include "common/ceph_argparse.h"
 #include "common/common_init.h"
-#include "common/errno.h"
 #include "common/safe_io.h"
        
 #ifndef DARWIN
@@ -147,13 +146,7 @@ int main(int argc, const char **argv, const char *envp[]) {
 
     if (g_conf.daemonize) {
       //cout << "child signalling parent with " << r << std::endl;
-      int32_t out = r;
-      int ret = safe_write(fd[1], &out, sizeof(out));
-      if (ret) {
-       derr << "cfuse[" << getpid() << "]: failed to write to fd[1]: "
-            << cpp_strerror(ret) << dendl;
-       ceph_abort();
-      }
+      ::write(fd[1], &r, sizeof(r));
     }
 
     //cout << "child done" << std::endl;