projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port: Remove _GNU_SOURCE, defined in config.h
[lttng-tools.git]
/
src
/
bin
/
lttng-consumerd
/
health-consumerd.c
diff --git
a/src/bin/lttng-consumerd/health-consumerd.c
b/src/bin/lttng-consumerd/health-consumerd.c
index ad2b5245a849f769d295f5a51464c973f1145b5b..8d632ef95262256868555e5d2dcb0a6fc7dcb25c 100644
(file)
--- a/
src/bin/lttng-consumerd/health-consumerd.c
+++ b/
src/bin/lttng-consumerd/health-consumerd.c
@@
-15,7
+15,7
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _
GNU
_SOURCE
+#define _
LGPL
_SOURCE
#include <fcntl.h>
#include <getopt.h>
#include <grp.h>
#include <fcntl.h>
#include <getopt.h>
#include <grp.h>
@@
-36,7
+36,6
@@
#include <unistd.h>
#include <sys/mman.h>
#include <assert.h>
#include <unistd.h>
#include <sys/mman.h>
#include <assert.h>
-#include <config.h>
#include <urcu/compiler.h>
#include <ulimit.h>
#include <inttypes.h>
#include <urcu/compiler.h>
#include <ulimit.h>
#include <inttypes.h>
@@
-260,6
+259,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 = check_health_quit_pipe(pollfd, revents);
if (ret) {
/* Thread quit pipe has been closed. Killing thread. */
ret = check_health_quit_pipe(pollfd, revents);
if (ret) {
@@
-269,7
+273,8
@@
restart:
/* Event on the registration socket */
if (pollfd == sock) {
/* Event on the registration socket */
if (pollfd == sock) {
- if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)) {
+ if (revents & (LPOLLERR | LPOLLHUP | LPOLLRDHUP)
+ && !(revents & LPOLLIN)) {
ERR("Health socket poll error");
goto error;
}
ERR("Health socket poll error");
goto error;
}
@@
-303,7
+308,7
@@
restart:
assert(msg.cmd == HEALTH_CMD_CHECK);
assert(msg.cmd == HEALTH_CMD_CHECK);
-
reply.ret_code = 0
;
+
memset(&reply, 0, sizeof(reply))
;
for (i = 0; i < NR_HEALTH_CONSUMERD_TYPES; i++) {
/*
* health_check_state return 0 if thread is in
for (i = 0; i < NR_HEALTH_CONSUMERD_TYPES; i++) {
/*
* health_check_state return 0 if thread is in
@@
-314,7
+319,7
@@
restart:
}
}
}
}
- DBG
2
("Health check return value %" PRIx64, reply.ret_code);
+ DBG("Health check return value %" PRIx64, reply.ret_code);
ret = send_unix_sock(new_sock, (void *) &reply, sizeof(reply));
if (ret < 0) {
ret = send_unix_sock(new_sock, (void *) &reply, sizeof(reply));
if (ret < 0) {
This page took
0.027194 seconds
and
4
git commands to generate.