]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/pthreadpool: Incorrect error state detected for dup2 call
authorNoel Power <noel.power@suse.com>
Fri, 30 Jan 2026 13:23:53 +0000 (13:23 +0000)
committerNoel Power <npower@samba.org>
Fri, 13 Feb 2026 10:19:39 +0000 (10:19 +0000)
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Noel Power <noel.power@suse.com>
lib/pthreadpool/pthreadpool_pipe.c

index d6d519aeba418e399b87b44cc4f6ed120dd78261..6c457c72e06e89f16cc47ee1341e541bdc8d0ff1 100644 (file)
@@ -132,7 +132,7 @@ static int pthreadpool_pipe_reinit(struct pthreadpool_pipe *pool)
        }
 
        ret = dup2(pool->pipe_fds[0], signal_fd);
-       if (ret != 0) {
+       if (ret == -1) {
                return errno;
        }