#include <sys/wait.h>
#include <urcu/uatomic.h>
#include <unistd.h>
+#include <ctype.h>
#include <common/common.h>
#include <common/compat/socket.h>
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;
}
- 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");
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:
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:
if (ret) {
PERROR("close");
}
- new_sock = -1;
continue;
}
if (ret) {
PERROR("close");
}
- new_sock = -1;
}
exit:
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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
/* 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;
}
/* 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");