From: Noel Power Date: Fri, 30 Jan 2026 13:23:53 +0000 (+0000) Subject: lib/pthreadpool: Incorrect error state detected for dup2 call X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ec7fc7ef7fadae37a3fc3e7d387460d53c0e68;p=thirdparty%2Fsamba.git lib/pthreadpool: Incorrect error state detected for dup2 call Reviewed-by: Gary Lockyer Signed-off-by: Noel Power --- diff --git a/lib/pthreadpool/pthreadpool_pipe.c b/lib/pthreadpool/pthreadpool_pipe.c index d6d519aeba4..6c457c72e06 100644 --- a/lib/pthreadpool/pthreadpool_pipe.c +++ b/lib/pthreadpool/pthreadpool_pipe.c @@ -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; }