libdaemon: fix suppressing stray fd warnings
authorJack Wilsdon <jack@wilsdon.me>
Thu, 17 Oct 2024 19:38:41 +0000 (20:38 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 26 Feb 2025 00:21:19 +0000 (01:21 +0100)
Restore support for LVM_SUPPRESS_FD_WARNINGS as
this was seemingly lost with refactoring to
use daemon_close_stray_fds().

libdaemon/server/daemon-stray.h

index ac6e83b2b6dc743127e6fcf6909fa05070723af5..82aee14c1e481bc8674d577bc14fb29dc96cdda9 100644 (file)
@@ -105,16 +105,15 @@ static void _daemon_close_descriptor(int fd, unsigned suppress_warnings,
  * Note: when 'from_fd' is set to -1,  unused 'custom_fds' must use same value!
  *
  * command:            print command name with warning message
- * suppress_warning  whether to print warning messages
+ * suppress_warnings:  whether to print warning messages
  * above_fd:           close all descriptors above this descriptor
  * custom_fds:         preserve descriptors from this set of descriptors
  */
-static int daemon_close_stray_fds(const char *command, int suppress_warning,
+static int daemon_close_stray_fds(const char *command, int suppress_warnings,
                                  int from_fd, const struct custom_fds *custom_fds)
 {
        struct rlimit rlim;
        int fd;
-       unsigned suppress_warnings = 0;
        pid_t ppid = getppid();
        char parent_cmdline[64];
        static const char _fd_dir[] = DEFAULT_PROC_DIR "/self/fd";
This page took 0.111323 seconds and 5 git commands to generate.