From 5a47c6a2b20bd88bdb629e159009238248f10ba1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 2 Mar 2012 11:12:26 -0500 Subject: [PATCH] Fix: sessiond has incorrect missing 0 value in FD check When run with daemon(), the 0 file descriptor can be re-used for something else than stdout. Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-sessiond/kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 8e960dfed..371ee4f98 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -483,7 +483,7 @@ int kernel_open_channel_stream(struct ltt_kernel_channel *channel) int ret; struct ltt_kernel_stream *lks; - while ((ret = kernctl_create_stream(channel->fd)) > 0) { + while ((ret = kernctl_create_stream(channel->fd)) >= 0) { lks = trace_kernel_create_stream(); if (lks == NULL) { close(ret); -- 2.34.1