projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: Unchecked pthread_create return value
[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 578ab2ffad92329b584c5494e5b51135635e5c1f..0eb2db53815cbd2d0ff3f69f9218cef735c8b738 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-1357,7
+1357,6
@@
restart:
consumer_data->metadata_sock.lock = zmalloc(sizeof(pthread_mutex_t));
if (consumer_data->metadata_sock.lock == NULL) {
PERROR("zmalloc pthread mutex");
consumer_data->metadata_sock.lock = zmalloc(sizeof(pthread_mutex_t));
if (consumer_data->metadata_sock.lock == NULL) {
PERROR("zmalloc pthread mutex");
- ret = -1;
goto error;
}
pthread_mutex_init(consumer_data->metadata_sock.lock, NULL);
goto error;
}
pthread_mutex_init(consumer_data->metadata_sock.lock, NULL);
@@
-2366,8
+2365,8
@@
static int spawn_consumer_thread(struct consumer_data *consumer_data)
goto error;
}
goto error;
}
- ret = pthread_create(&consumer_data->thread,
NULL, thread_manage_consumer
,
- consumer_data);
+ ret = pthread_create(&consumer_data->thread,
default_pthread_attr()
,
+
thread_manage_consumer,
consumer_data);
if (ret) {
errno = ret;
PERROR("pthread_create consumer");
if (ret) {
errno = ret;
PERROR("pthread_create consumer");
@@
-3004,7
+3003,8
@@
static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
case LTTNG_SNAPSHOT_RECORD:
case LTTNG_SAVE_SESSION:
case LTTNG_SET_SESSION_SHM_PATH:
case LTTNG_SNAPSHOT_RECORD:
case LTTNG_SAVE_SESSION:
case LTTNG_SET_SESSION_SHM_PATH:
- case LTTNG_METADATA_REGENERATE:
+ case LTTNG_REGENERATE_METADATA:
+ case LTTNG_REGENERATE_STATEDUMP:
need_domain = 0;
break;
default:
need_domain = 0;
break;
default:
@@
-4115,9
+4115,14
@@
error_add_context:
cmd_ctx->lsm->u.set_shm_path.shm_path);
break;
}
cmd_ctx->lsm->u.set_shm_path.shm_path);
break;
}
- case LTTNG_METADATA_REGENERATE:
+ case LTTNG_REGENERATE_METADATA:
+ {
+ ret = cmd_regenerate_metadata(cmd_ctx->session);
+ break;
+ }
+ case LTTNG_REGENERATE_STATEDUMP:
{
{
- ret = cmd_
metadata_regenerate
(cmd_ctx->session);
+ ret = cmd_
regenerate_statedump
(cmd_ctx->session);
break;
}
default:
break;
}
default:
@@
-5980,7
+5985,7
@@
int main(int argc, char **argv)
load_info->path = opt_load_session_path;
/* Create health-check thread */
load_info->path = opt_load_session_path;
/* Create health-check thread */
- ret = pthread_create(&health_thread,
NULL
,
+ ret = pthread_create(&health_thread,
default_pthread_attr()
,
thread_manage_health, (void *) NULL);
if (ret) {
errno = ret;
thread_manage_health, (void *) NULL);
if (ret) {
errno = ret;
@@
-5990,7
+5995,7
@@
int main(int argc, char **argv)
}
/* Create thread to manage the client socket */
}
/* Create thread to manage the client socket */
- ret = pthread_create(&client_thread,
NULL
,
+ ret = pthread_create(&client_thread,
default_pthread_attr()
,
thread_manage_clients, (void *) NULL);
if (ret) {
errno = ret;
thread_manage_clients, (void *) NULL);
if (ret) {
errno = ret;
@@
-6000,7
+6005,7
@@
int main(int argc, char **argv)
}
/* Create thread to dispatch registration */
}
/* Create thread to dispatch registration */
- ret = pthread_create(&dispatch_thread,
NULL
,
+ ret = pthread_create(&dispatch_thread,
default_pthread_attr()
,
thread_dispatch_ust_registration, (void *) NULL);
if (ret) {
errno = ret;
thread_dispatch_ust_registration, (void *) NULL);
if (ret) {
errno = ret;
@@
-6010,7
+6015,7
@@
int main(int argc, char **argv)
}
/* Create thread to manage application registration. */
}
/* Create thread to manage application registration. */
- ret = pthread_create(®_apps_thread,
NULL
,
+ ret = pthread_create(®_apps_thread,
default_pthread_attr()
,
thread_registration_apps, (void *) NULL);
if (ret) {
errno = ret;
thread_registration_apps, (void *) NULL);
if (ret) {
errno = ret;
@@
-6020,7
+6025,7
@@
int main(int argc, char **argv)
}
/* Create thread to manage application socket */
}
/* Create thread to manage application socket */
- ret = pthread_create(&apps_thread,
NULL
,
+ ret = pthread_create(&apps_thread,
default_pthread_attr()
,
thread_manage_apps, (void *) NULL);
if (ret) {
errno = ret;
thread_manage_apps, (void *) NULL);
if (ret) {
errno = ret;
@@
-6030,7
+6035,7
@@
int main(int argc, char **argv)
}
/* Create thread to manage application notify socket */
}
/* Create thread to manage application notify socket */
- ret = pthread_create(&apps_notify_thread,
NULL
,
+ ret = pthread_create(&apps_notify_thread,
default_pthread_attr()
,
ust_thread_manage_notify, (void *) NULL);
if (ret) {
errno = ret;
ust_thread_manage_notify, (void *) NULL);
if (ret) {
errno = ret;
@@
-6040,7
+6045,7
@@
int main(int argc, char **argv)
}
/* Create agent registration thread. */
}
/* Create agent registration thread. */
- ret = pthread_create(&agent_reg_thread,
NULL
,
+ ret = pthread_create(&agent_reg_thread,
default_pthread_attr()
,
agent_thread_manage_registration, (void *) NULL);
if (ret) {
errno = ret;
agent_thread_manage_registration, (void *) NULL);
if (ret) {
errno = ret;
@@
-6052,7
+6057,7
@@
int main(int argc, char **argv)
/* Don't start this thread if kernel tracing is not requested nor root */
if (is_root && !opt_no_kernel) {
/* Create kernel thread to manage kernel event */
/* Don't start this thread if kernel tracing is not requested nor root */
if (is_root && !opt_no_kernel) {
/* Create kernel thread to manage kernel event */
- ret = pthread_create(&kernel_thread,
NULL
,
+ ret = pthread_create(&kernel_thread,
default_pthread_attr()
,
thread_manage_kernel, (void *) NULL);
if (ret) {
errno = ret;
thread_manage_kernel, (void *) NULL);
if (ret) {
errno = ret;
@@
-6063,8
+6068,8
@@
int main(int argc, char **argv)
}
/* Create session loading thread. */
}
/* Create session loading thread. */
- ret = pthread_create(&load_session_thread,
NULL, thread_load_session
,
- load_info);
+ ret = pthread_create(&load_session_thread,
default_pthread_attr()
,
+
thread_load_session,
load_info);
if (ret) {
errno = ret;
PERROR("pthread_create load_session_thread");
if (ret) {
errno = ret;
PERROR("pthread_create load_session_thread");
This page took
0.029077 seconds
and
4
git commands to generate.