diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-07-27 19:14:53 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-07-27 19:14:53 -0400 |
commit | c50d65cb1faca8e7632a355940381b517d2ac589 (patch) | |
tree | d82d96661035ae7ae5e0b6e9c8695b6d06c7a3b1 /src/xspawn.c | |
parent | 085bb402c7b2c2f96624fb0523ff3f9686fe26d9 (diff) | |
download | bfs-c50d65cb1faca8e7632a355940381b517d2ac589.tar.xz |
xspawn: Fix error message if pthread_sigmask() fails
Diffstat (limited to 'src/xspawn.c')
-rw-r--r-- | src/xspawn.c | 4 |
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 |