projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: unnecessary duplicated call to exit()
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index 10802aa7b2cc66d87d0946ee53623b05b47a1c0f..968fec84a1d6bc80299cbbcd0aa2241de84f5012 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-2413,9
+2413,9
@@
static pid_t spawn_consumerd(struct consumer_data *consumer_data)
* fallback on the 32-bit one,
*/
DBG3("Looking for a kernel consumer at these locations:");
* fallback on the 32-bit one,
*/
DBG3("Looking for a kernel consumer at these locations:");
- DBG3(" 1) %s", config.consumerd64_bin_path.value);
+ DBG3(" 1) %s", config.consumerd64_bin_path.value
? : "NULL"
);
DBG3(" 2) %s/%s", INSTALL_BIN_PATH, DEFAULT_CONSUMERD_FILE);
DBG3(" 2) %s/%s", INSTALL_BIN_PATH, DEFAULT_CONSUMERD_FILE);
- DBG3(" 3) %s", config.consumerd32_bin_path.value);
+ DBG3(" 3) %s", config.consumerd32_bin_path.value
? : "NULL"
);
if (stat(config.consumerd64_bin_path.value, &st) == 0) {
DBG3("Found location #1");
consumer_to_use = config.consumerd64_bin_path.value;
if (stat(config.consumerd64_bin_path.value, &st) == 0) {
DBG3("Found location #1");
consumer_to_use = config.consumerd64_bin_path.value;
@@
-2442,7
+2442,7
@@
static pid_t spawn_consumerd(struct consumer_data *consumer_data)
{
char *tmpnew = NULL;
{
char *tmpnew = NULL;
- if (config.consumerd64_lib_dir.value
[0] != '\0'
) {
+ if (config.consumerd64_lib_dir.value) {
char *tmp;
size_t tmplen;
char *tmp;
size_t tmplen;
@@
-2476,16
+2476,14
@@
static pid_t spawn_consumerd(struct consumer_data *consumer_data)
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
- if (config.consumerd64_lib_dir.value[0] != '\0') {
- free(tmpnew);
- }
+ free(tmpnew);
break;
}
case LTTNG_CONSUMER32_UST:
{
char *tmpnew = NULL;
break;
}
case LTTNG_CONSUMER32_UST:
{
char *tmpnew = NULL;
- if (config.consumerd32_lib_dir.value
[0] != '\0'
) {
+ if (config.consumerd32_lib_dir.value) {
char *tmp;
size_t tmplen;
char *tmp;
size_t tmplen;
@@
-2519,14
+2517,12
@@
static pid_t spawn_consumerd(struct consumer_data *consumer_data)
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
"--consumerd-err-sock", consumer_data->err_unix_sock_path,
"--group", config.tracing_group_name.value,
NULL);
- if (config.consumerd32_lib_dir.value[0] != '\0') {
- free(tmpnew);
- }
+ free(tmpnew);
break;
}
default:
break;
}
default:
-
PERRO
R("unknown consumer type");
- e
xit(EXIT_FAILURE)
;
+
ER
R("unknown consumer type");
+ e
rrno = 0
;
}
if (errno != 0) {
PERROR("Consumer execl()");
}
if (errno != 0) {
PERROR("Consumer execl()");
@@
-5584,12
+5580,13
@@
int main(int argc, char **argv)
/* Check if daemon is UID = 0 */
is_root = !getuid();
/* Check if daemon is UID = 0 */
is_root = !getuid();
+ if (create_lttng_rundir()) {
+ retval = -1;
+ goto exit_init_data;
+ }
+
if (is_root) {
/* Create global run dir with root access */
if (is_root) {
/* Create global run dir with root access */
- if (create_lttng_rundir()) {
- retval = -1;
- goto exit_init_data;
- }
kernel_channel_monitor_pipe = lttng_pipe_open(0);
if (!kernel_channel_monitor_pipe) {
kernel_channel_monitor_pipe = lttng_pipe_open(0);
if (!kernel_channel_monitor_pipe) {
This page took
0.02515 seconds
and
4
git commands to generate.