Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
#include <unistd.h>
// ceph
+#include "common/errno.h"
+#include "common/safe_io.h"
#include "include/types.h"
#include "Client.h"
#include "config.h"
{
if (fd_on_success) {
//cout << "fuse init signaling on fd " << fd_on_success << std::endl;
- int r = 0;
- ::write(fd_on_success, &r, sizeof(r));
+ uint32_t r = 0;
+ int err = safe_write(fd_on_success, &r, sizeof(r));
+ if (err) {
+ derr << "fuse_ll: do_init: safe_write failed with error "
+ << cpp_strerror(err) << dendl;
+ ceph_abort();
+ }
//cout << "fuse init done signaling on fd " << fd_on_success << std::endl;
// close stdout, etc.