summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-07-27 19:14:53 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-07-27 19:14:53 -0400
commitc50d65cb1faca8e7632a355940381b517d2ac589 (patch)
treed82d96661035ae7ae5e0b6e9c8695b6d06c7a3b1
parent085bb402c7b2c2f96624fb0523ff3f9686fe26d9 (diff)
downloadbfs-c50d65cb1faca8e7632a355940381b517d2ac589.tar.xz
xspawn: Fix error message if pthread_sigmask() fails
-rw-r--r--src/xspawn.c4
1 files changed, 2 insertions, 2 deletions
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