Revert "sessiond: trigger: run trigger actions through an action executor"
[lttng-tools.git] / src / bin / lttng-sessiond / manage-kernel.c
index 56bc0a93ca6147807d02059058daa2b23ae4a0e5..09e47f7db3bef30bd6fd2eb45206df94d2a72471 100644 (file)
@@ -1,20 +1,10 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
- *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *               2013 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #include <common/pipe.h>
@@ -267,11 +257,6 @@ static void *thread_kernel_management(void *data)
 
                        health_code_update();
 
-                       if (!revents) {
-                               /* No activity for this FD (poll implementation). */
-                               continue;
-                       }
-
                        if (pollfd == quit_pipe_read_fd) {
                                err = 0;
                                goto exit;
@@ -347,13 +332,12 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd)
        struct thread_notifiers *notifiers = NULL;
        struct lttng_thread *thread;
 
-       quit_pipe = lttng_pipe_open(FD_CLOEXEC);
-       if (!quit_pipe) {
-               goto error;
-       }
-
        notifiers = zmalloc(sizeof(*notifiers));
        if (!notifiers) {
+               goto error_alloc;
+       }
+       quit_pipe = lttng_pipe_open(FD_CLOEXEC);
+       if (!quit_pipe) {
                goto error;
        }
        notifiers->quit_pipe = quit_pipe;
@@ -371,5 +355,6 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd)
        return true;
 error:
        cleanup_kernel_management_thread(notifiers);
+error_alloc:
        return false;
 }
This page took 0.024389 seconds and 5 git commands to generate.