*/
utils_close_pipe(thread_quit_pipe);
- /*
- * If config.pid_file_path.value is undefined, the default file will be
- * wiped when removing the rundir.
- */
- if (config.pid_file_path.value) {
- ret = remove(config.pid_file_path.value);
- if (ret < 0) {
- PERROR("remove pidfile %s", config.pid_file_path.value);
- }
+ ret = remove(config.pid_file_path.value);
+ if (ret < 0) {
+ PERROR("remove pidfile %s", config.pid_file_path.value);
}
DBG("Removing sessiond and consumerd content of directory %s",
ret = config_set_paths_non_root(config);
}
if (ret < 0) {
- goto end;
+ goto error;
}
/* 32 bits consumerd path setup */
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 32-bit consumer path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd32_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 32-bit consumer error socket path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd32_err_unix_sock_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 32-bit consumer command socket path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd32_cmd_unix_sock_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 64-bit consumer path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd64_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 64-bit consumer error socket path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd64_err_unix_sock_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set 64-bit consumer command socket path");
- goto end;
+ goto error;
}
config_string_set(&config->consumerd64_cmd_unix_sock_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set kernel consumer path");
- goto end;
+ goto error;
}
config_string_set(&config->kconsumerd_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set kernel consumer error socket path");
- goto end;
+ goto error;
}
config_string_set(&config->kconsumerd_err_unix_sock_path, str);
str = NULL;
config->rundir.value);
if (ret < 0) {
ERR("Failed to set kernel consumer command socket path");
- goto end;
+ goto error;
}
config_string_set(&config->kconsumerd_cmd_unix_sock_path, str);
str = NULL;
DEFAULT_LTTNG_SESSIOND_PIDFILE);
if (ret < 0) {
ERR("Failed to set PID file path");
- goto end;
+ goto error;
}
config_string_set(&config->pid_file_path, str);
str = NULL;
DEFAULT_LTTNG_SESSIOND_LOCKFILE);
if (ret < 0) {
ERR("Failed to set lock file path");
- goto end;
+ goto error;
}
config_string_set(&config->lock_file_path, str);
str = NULL;
DEFAULT_LTTNG_SESSIOND_AGENTPORT_FILE);
if (ret < 0) {
ERR("Failed to set agent port file path");
- goto end;
+ goto error;
}
config_string_set(&config->agent_port_file_path, str);
str = NULL;
#error "Unknown bitness"
#endif
ret = 0;
-end:
+ return ret;
+error:
+ sessiond_config_fini(config);
return ret;
}