From 70d77095b8c780a7787d9dd2fcde02bdce19c6c8 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 3 Jun 2011 14:29:35 -0700 Subject: [PATCH] Revert "cfuse.cc: use safe_write" 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 --- src/cfuse.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/cfuse.cc b/src/cfuse.cc index 5d063c652bb6f..d1fa3f2bcc33d 100644 --- a/src/cfuse.cc +++ b/src/cfuse.cc @@ -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; -- 2.39.5