summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/posix_spawn.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-09-05 08:55:51 +0000
committerkib <kib@FreeBSD.org>2015-09-05 08:55:51 +0000
commit438719ab519dd2b4b76f22db4f09fc1ecacd16f4 (patch)
treed0067728c5e8d2139aa12f79004c5285fec61bba /lib/libc/gen/posix_spawn.c
parent906861047e3b66a3d4c92eb83ea28b542ca143ff (diff)
downloadFreeBSD-src-438719ab519dd2b4b76f22db4f09fc1ecacd16f4.zip
FreeBSD-src-438719ab519dd2b4b76f22db4f09fc1ecacd16f4.tar.gz
MFC r287292:
Switch libc from using _sig{procmask,action,suspend} symbols, which are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. MFC r287300: Use libthr interposed functions instead of syscalls, in posix_spawn()' child.
Diffstat (limited to 'lib/libc/gen/posix_spawn.c')
-rw-r--r--lib/libc/gen/posix_spawn.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
index e3124b2..c65a730 100644
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -118,15 +118,18 @@ process_spawnattr(const posix_spawnattr_t sa)
return (errno);
}
- /* Set signal masks/defaults */
+ /*
+ * Set signal masks/defaults.
+ * Use unwrapped syscall, libthr is in undefined state after vfork().
+ */
if (sa->sa_flags & POSIX_SPAWN_SETSIGMASK) {
- _sigprocmask(SIG_SETMASK, &sa->sa_sigmask, NULL);
+ __sys_sigprocmask(SIG_SETMASK, &sa->sa_sigmask, NULL);
}
if (sa->sa_flags & POSIX_SPAWN_SETSIGDEF) {
for (i = 1; i <= _SIG_MAXSIG; i++) {
if (sigismember(&sa->sa_sigdefault, i))
- if (_sigaction(i, &sigact, NULL) != 0)
+ if (__sys_sigaction(i, &sigact, NULL) != 0)
return (errno);
}
}
OpenPOWER on IntegriCloud