Fix: sessiond: leak of trigger on registration error
[lttng-tools.git] / src / bin / lttng-sessiond / fd-limit.c
index 17a18afdc7b3f1d8f968f21b6555c2a6f661508d..973f7d74aa2acd76f4aaef764f11807cb461676b 100644 (file)
@@ -1,28 +1,18 @@
 /*
- * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2012 Mathieu Desnoyers <mathieu.desnoyers@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.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <urcu/uatomic.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-#include <errno.h>
 #include <stdio.h>
 #include "fd-limit.h"
+#include <common/error.h>
+#include <common/compat/errno.h>
 
 /* total count of fd. */
 static long fd_count;
@@ -65,7 +55,7 @@ void lttng_fd_init(void)
 
        ret = getrlimit(RLIMIT_NOFILE, &rlim);
        if (ret < 0) {
-               perror("getrlimit");
+               PERROR("getrlimit");
        }
        max_nr_fd = rlim.rlim_cur;
 }
This page took 0.024223 seconds and 4 git commands to generate.