glibc/sysdeps
Adhemerval Zanella 9b2cf9482a linux: Use waitid on wait4 if __NR_wait4 is not defined
If the wait4 syscall is not available (such as y2038 safe 32-bit
systems) waitid should be used instead.  However prior Linux 5.4
waitid is not a full superset of other wait syscalls, since it
does not include support for waiting for the current process group.

It is possible to emulate wait4 by issuing an extra syscall to get
the current process group, but it is inherent racy: after the current
process group is received and before it is passed to waitid a signal
could arrive causing the current process group to change.

So waitid is used if wait4 is not defined iff the build is
enabled with a minimum kernel if 5.4+.  The new assume
__ASSUME_WAITID_PID0_P_PGID is added and an error is issued if waitid
can not be implemented by either __NR_wait4 or
__NR_waitid && __ASSUME_WAITID_PID0_P_PGID.

Checked on x86_64-linux-gnu and i686-linux-gnu.

Co-authored-by: Alistair Francis <alistair.francis@wdc.com>
2019-12-19 16:11:09 -03:00
..
aarch64 elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] 2019-12-02 14:55:22 +01:00
alpha nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
arm elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] 2019-12-02 14:55:22 +01:00
csky nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
generic Remove __waitpid_nocancel 2019-12-19 16:11:09 -03:00
gnu Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h. 2019-09-27 13:37:36 +00:00
hppa nptl: Add struct_rwlock.h 2019-11-26 13:53:36 +00:00
htl time: Introduce function to check correctness of nanoseconds value 2019-10-27 21:49:25 +01:00
hurd Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
i386 elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] 2019-12-02 14:55:22 +01:00
ia64 nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
ieee754 ldbl-128ibm-compat: Add ISO C99 versions of scanf functions 2019-12-13 18:02:09 -03:00
init_array Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
m68k nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
mach hurd: Do not make sigprocmask available in ld.so 2019-12-18 10:53:17 +01:00
microblaze nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
mips nptl: Add struct_rwlock.h 2019-11-26 13:53:36 +00:00
nios2 nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
nptl nptl: Fix __PTHREAD_MUTEX_INITIALIZER for !__PTHREAD_MUTEX_HAVE_PREV 2019-11-26 17:00:19 -03:00
posix Implement wait in terms of waitpid 2019-12-19 16:11:09 -03:00
powerpc powerpc: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] 2019-12-19 09:49:57 -03:00
pthread Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
riscv sysdeps/riscv/start.S: rename .Lload_gp to load_gp (bug 24376) 2019-12-09 12:05:26 +01:00
s390 S390: Use sysdeps/ieee754/dbl-64/wordsize-64 on s390x. 2019-12-11 15:12:26 +01:00
sh nptl: Add default pthread-offsets.h 2019-11-26 13:53:36 +00:00
sparc Always use wordsize-64 version of s_trunc.c. 2019-12-11 15:12:14 +01:00
unix linux: Use waitid on wait4 if __NR_wait4 is not defined 2019-12-19 16:11:09 -03:00
wordsize-32 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
wordsize-64 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
x86 nptl: Add struct_rwlock.h 2019-11-26 13:53:36 +00:00
x86_64 Always use wordsize-64 version of s_trunc.c. 2019-12-11 15:12:14 +01:00