vec_to_argv(args, argc, argv);
// FUSE will chdir("/"); be ready.
- g_conf.use_abspaths = true;
+ g_conf.chdir_root = true;
if (g_conf.clock_tare) g_clock.tare();
debug_after: 0,
// -- misc --
- use_abspaths: false, // make monitorstore et al use absolute path (to workaround FUSE chdir("/"))
+ chdir_root: false,
// --- clock ---
clock_lock: false,
CF_READ("debug", "ms", debug_ms);
CF_READ("debug", "mon", debug_mon);
CF_READ("debug", "tp", debug_tp);
- CF_READ("debug", "use abspaths", use_abspaths);
+ CF_READ("debug", "chdir root", chdir_root);
CF_READ("clock", "lock", clock_lock);
CF_READ("clock", "tare", clock_tare);
return -errno;
}
- if (g_conf.use_abspaths && dir[0] != '/') {
+ if (g_conf.chdir_root && dir[0] != '/') {
// combine it with the cwd, in case fuse screws things up (i.e. fakefuse)
string old = dir;
char cwd[200];
}
dout(1) << "rank.start daemonizing" << dendl;
- // be polite
- if (g_conf.use_abspaths)
- ::chdir("/");
-
- pid_t child = fork();
- if (child) {
- write_pid_file(child);
- _exit(0);
- }
+ ::daemon(!g_conf.chdir_root, 0);
+ write_pid_file(getpid());
_dout_rename_output_file();
} else {