#include "common/Timer.h"
#include "common/common_init.h"
+#include "common/errno.h"
+#include "common/safe_io.h"
#ifndef DARWIN
#include <envz.h>
if (daemonize) {
//cout << "child signalling parent with " << r << std::endl;
- ::write(fd[1], &r, sizeof(r));
+ 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();
+ }
}
//cout << "child done" << std::endl;