projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix headers include and rename kernctl.h header
[lttng-tools.git]
/
ltt-sessiond
/
main.c
diff --git
a/ltt-sessiond/main.c
b/ltt-sessiond/main.c
index abd4e087fd313c11fea10376393b32e9f6c29e5c..dd9f221de58b9d53c111f2729d50c9317af00e2d 100644
(file)
--- a/
ltt-sessiond/main.c
+++ b/
ltt-sessiond/main.c
@@
-29,29
+29,23
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/ipc.h>
#include <sys/mount.h>
#include <sys/mount.h>
-#include <sys/
shm
.h>
+#include <sys/
resource
.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include <unistd.h>
#include <unistd.h>
-#include <urcu/list.h> /* URCU list library (-lurcu) */
-#include <lttng/lttng.h>
-#include <lttng/lttng-kconsumerd.h>
+#include <ltt-kconsumerd.h>
#include <lttng-sessiond-comm.h>
#include <lttng-sessiond-comm.h>
+#include <lttng/lttng-kconsumerd.h>
+#include <lttngerr.h>
#include "context.h"
#include "context.h"
-#include "ltt-sessiond.h"
-#include "lttngerr.h"
#include "kernel-ctl.h"
#include "kernel-ctl.h"
-#include "ust-ctl.h"
-#include "session.h"
+#include "ltt-sessiond.h"
#include "traceable-app.h"
#include "traceable-app.h"
-#include "
ltt-kconsumerd
.h"
+#include "
ust-ctl
.h"
#include "utils.h"
/* Const values */
#include "utils.h"
/* Const values */
@@
-859,10
+853,10
@@
static void *thread_manage_apps(void *data)
}
/*
}
/*
- *
Basic recv here to handle the very simple data
- *
that the libust send to register (reg_msg)
.
+ *
Using message-based transmissions to ensure we don't
+ *
have to deal with partially received messages
.
*/
*/
- ret =
recv(sock, ®_msg, sizeof(reg_msg), 0
);
+ ret =
lttcomm_recv_unix_sock(sock, ®_msg, sizeof(reg_msg)
);
if (ret < 0) {
perror("recv");
continue;
if (ret < 0) {
perror("recv");
continue;
@@
-871,6
+865,11
@@
static void *thread_manage_apps(void *data)
/* Add application to the global traceable list */
if (reg_msg.reg == 1) {
/* Registering */
/* Add application to the global traceable list */
if (reg_msg.reg == 1) {
/* Registering */
+ /*
+ * TODO: socket should be either passed to a
+ * listener thread (for more messages) or
+ * closed. It currently leaks.
+ */
ret = register_traceable_app(reg_msg.pid, reg_msg.uid);
if (ret < 0) {
/* register_traceable_app only return an error with
ret = register_traceable_app(reg_msg.pid, reg_msg.uid);
if (ret < 0) {
/* register_traceable_app only return an error with
This page took
0.02627 seconds
and
4
git commands to generate.