projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: poll: show the correct number of fds
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
jul-thread.c
diff --git
a/src/bin/lttng-sessiond/jul-thread.c
b/src/bin/lttng-sessiond/jul-thread.c
index d8748f2a5aad5e3c246a0016af7bd72e0a43bde6..ff6832f9faeb001afa49f0bd4c936019df9b4cf7 100644
(file)
--- a/
src/bin/lttng-sessiond/jul-thread.c
+++ b/
src/bin/lttng-sessiond/jul-thread.c
@@
-23,6
+23,8
@@
#include <common/uri.h>
#include <common/utils.h>
#include <common/uri.h>
#include <common/utils.h>
+#include <common/compat/endian.h>
+
#include "fd-limit.h"
#include "jul-thread.h"
#include "lttng-sessiond.h"
#include "fd-limit.h"
#include "jul-thread.h"
#include "lttng-sessiond.h"
@@
-142,8
+144,8
@@
static struct lttcomm_sock *init_tcp_socket(void)
ret = sock->ops->bind(sock);
if (ret < 0) {
ret = sock->ops->bind(sock);
if (ret < 0) {
- WARN("An
other session daemon is using this JUL port. JUL support "
- "will be deactivated
no
t interfering with the tracing.");
+ WARN("Another session daemon is using this JUL port. JUL support "
+ "will be deactivated
to preven
t interfering with the tracing.");
goto error;
}
goto error;
}
@@
-206,7
+208,7
@@
static int handle_registration(struct lttcomm_sock *reg_sock,
size = new_sock->ops->recvmsg(new_sock, &msg, sizeof(msg), 0);
if (size < sizeof(msg)) {
size = new_sock->ops->recvmsg(new_sock, &msg, sizeof(msg), 0);
if (size < sizeof(msg)) {
- ret = -
errno
;
+ ret = -
EINVAL
;
goto error_socket;
}
pid = be32toh(msg.pid);
goto error_socket;
}
pid = be32toh(msg.pid);
@@
-282,12
+284,13
@@
void *jul_thread_manage_registration(void *data)
}
while (1) {
}
while (1) {
- DBG3("[jul-thread] Manage JUL polling on %d fds",
- LTTNG_POLL_GETNB(&events));
+ DBG3("[jul-thread] Manage JUL polling");
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
/* Inifinite blocking call, waiting for transmission */
restart:
ret = lttng_poll_wait(&events, -1);
+ DBG3("[jul-thread] Manage agent return from poll on %d fds",
+ LTTNG_POLL_GETNB(&events));
if (ret < 0) {
/*
* Restart interrupted system call.
if (ret < 0) {
/*
* Restart interrupted system call.
@@
-305,6
+308,11
@@
restart:
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
revents = LTTNG_POLL_GETEV(&events, i);
pollfd = LTTNG_POLL_GETFD(&events, i);
+ if (!revents) {
+ /* No activity for this FD (poll implementation). */
+ continue;
+ }
+
/* Thread quit pipe has been closed. Killing thread. */
ret = sessiond_check_thread_quit_pipe(pollfd, revents);
if (ret) {
/* Thread quit pipe has been closed. Killing thread. */
ret = sessiond_check_thread_quit_pipe(pollfd, revents);
if (ret) {
This page took
0.024882 seconds
and
4
git commands to generate.