glibc/sysdeps
Adam Yi 413af1eb02 posix: Fix system blocks SIGCHLD erroneously [BZ #30163]
Fix bug that SIGCHLD is erroneously blocked forever in the following
scenario:

1. Thread A calls system but hasn't returned yet
2. Thread B calls another system but returns

SIGCHLD would be blocked forever in thread B after its system() returns,
even after the system() in thread A returns.

Although POSIX does not require, glibc system implementation aims to be
thread and cancellation safe. This bug was introduced in
5fb7fc9635 when we moved reverting signal
mask to happen when the last concurrently running system returns,
despite that signal mask is per thread. This commit reverts this logic
and adds a test.

Signed-off-by: Adam Yi <ayi@janestreet.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
(cherry picked from commit 436a604b7d)
2023-04-28 16:04:09 +02:00
..
aarch64 elf: Fix rtld-audit trampoline for aarch64 2022-11-22 10:44:11 -03:00
alpha Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
arc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
arm Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
csky Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
generic sysdeps: Add 'get_fast_jitter' interace in fast-jitter.h 2022-09-28 07:29:24 -07:00
gnu Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
hppa hppa: Fix initialization of dp register [BZ 29635] 2022-10-01 19:54:55 +00:00
htl htl: Fix build error in annexc 2022-01-17 23:18:27 +00:00
hurd hurd: Fix pthread_kill on exiting/ted thread 2022-01-15 15:11:54 +01:00
i386 i386: Regenerate ulps 2022-04-27 21:17:50 -04:00
ia64 elf: Issue la_symbind for bind-now (BZ #23734) 2022-02-01 14:49:46 -03:00
ieee754 math: Fix float conversion regressions with gcc-12 [BZ #28713] 2022-01-10 14:27:17 +00:00
m68k m68k: Handle fewer relocations for RTLD_BOOTSTRAP (#BZ29071) 2022-04-20 14:54:27 -07:00
mach socket: Check lengths before advancing pointer in CMSG_NXTHDR 2022-08-22 16:39:22 +02:00
microblaze Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
mips elf: Add <dl-r_debug.h> 2022-01-31 07:05:48 -08:00
nios2 nios2: Remove _dl_skip_args usage (BZ# 29187) 2022-06-10 08:39:50 -03:00
nptl nptl: Add backoff mechanism to spinlock loop 2022-09-28 07:29:49 -07:00
or1k or1k: Define PI_STATIC_AND_HIDDEN 2022-02-02 20:05:12 +09:00
posix posix: Fix system blocks SIGCHLD erroneously [BZ #30163] 2023-04-28 16:04:09 +02:00
powerpc elf/tst-tlsopt-powerpc fails when compiled with -mcpu=power10 (BZ# 29776) 2023-01-10 17:03:43 +01:00
pthread nptl: Fix __libc_cleanup_pop_restore asynchronous restore (BZ#29214) 2022-06-08 09:38:56 -03:00
riscv riscv: Update rv64 libm test ulps 2022-08-05 16:23:31 +02:00
s390 S390: Enable static PIE 2022-05-19 09:46:56 +02:00
sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
sparc Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
unix Linux: Support __IPC_64 in sysvctl *ctl command arguments (bug 29771) 2022-11-11 18:20:16 +01:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
x86 x86: Check minimum/maximum of non_temporal_threshold [BZ #29953] 2023-04-20 15:49:52 +02:00
x86_64 x86_64: Fix asm constraints in feraiseexcept (bug 30305) 2023-04-24 15:34:29 +02:00