projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Launch the application notification thread using lttng_thread
[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 f1c2cd37cfedf22281f100fc80537259bd3fc32b..39800b51ccba4cefaec88d13e803620da6a02b10 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-142,9
+142,9
@@
static const char *config_ignore_options[] = { "help", "version", "config" };
* that a command is queued and ready to be processed.
*/
static int apps_cmd_pipe[2] = { -1, -1 };
* that a command is queued and ready to be processed.
*/
static int apps_cmd_pipe[2] = { -1, -1 };
+static int apps_cmd_notify_pipe[2] = { -1, -1 };
/* Pthread, Mutexes and Semaphores */
/* Pthread, Mutexes and Semaphores */
-static pthread_t apps_notify_thread;
static pthread_t kernel_thread;
static pthread_t agent_reg_thread;
static pthread_t load_session_thread;
static pthread_t kernel_thread;
static pthread_t agent_reg_thread;
static pthread_t load_session_thread;
@@
-293,14
+293,14
@@
static void sessiond_cleanup(void)
* since we are now called.
*/
sessiond_close_quit_pipe();
* since we are now called.
*/
sessiond_close_quit_pipe();
+ utils_close_pipe(apps_cmd_pipe);
+ utils_close_pipe(apps_cmd_notify_pipe);
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);
}
- utils_close_pipe(apps_cmd_pipe);
-
DBG("Removing sessiond and consumerd content of directory %s",
config.rundir.value);
DBG("Removing sessiond and consumerd content of directory %s",
config.rundir.value);
@@
-2442,13
+2442,8
@@
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, default_pthread_attr(),
- ust_thread_manage_notify, (void *) NULL);
- if (ret) {
- errno = ret;
- PERROR("pthread_create notify");
+ if (!launch_application_notification_thread(apps_cmd_notify_pipe[0])) {
retval = -1;
retval = -1;
- stop_threads();
goto exit_apps_notify;
}
goto exit_apps_notify;
}
@@
-2533,13
+2528,6
@@
exit_kernel:
retval = -1;
}
exit_agent_reg:
retval = -1;
}
exit_agent_reg:
-
- ret = pthread_join(apps_notify_thread, &status);
- if (ret) {
- errno = ret;
- PERROR("pthread_join apps notify");
- retval = -1;
- }
exit_apps_notify:
exit_apps:
exit_reg_apps:
exit_apps_notify:
exit_apps:
exit_reg_apps:
This page took
0.024713 seconds
and
4
git commands to generate.