Fix: sessiond has incorrect missing 0 value in FD check
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 2 Mar 2012 16:12:26 +0000 (11:12 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 2 Mar 2012 16:12:26 +0000 (11:12 -0500)
When run with daemon(), the 0 file descriptor can be re-used for
something else than stdout.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/kernel.c

index 8e960dfed8fe59786a3de2436aae3155db9851d6..371ee4f98a998a3639170ebde6cc8d7142056e94 100644 (file)
@@ -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);
This page took 0.026203 seconds and 4 git commands to generate.