From c50d65cb1faca8e7632a355940381b517d2ac589 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 27 Jul 2024 19:14:53 -0400 Subject: xspawn: Fix error message if pthread_sigmask() fails --- src/xspawn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xspawn.c b/src/xspawn.c index 789f370..8e6a727 100644 --- a/src/xspawn.c +++ b/src/xspawn.c @@ -623,8 +623,8 @@ static pid_t bfs_fork_spawn(struct bfs_resolver *res, const struct bfs_spawn *ct } // Restore the original signal mask - int ret = pthread_sigmask(SIG_SETMASK, &old_mask, NULL); - bfs_everify(ret == 0, "pthread_sigmask()"); + errno = pthread_sigmask(SIG_SETMASK, &old_mask, NULL); + bfs_everify(errno == 0, "pthread_sigmask()"); if (pid < 0) { // fork() failed -- cgit v1.2.3