diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-11-13 17:45:13 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-12-19 16:11:09 -0300 |
commit | 9b2cf9482a9397c4711c9e7f42f8d718b6306bdc (patch) | |
tree | 2038aa8dfbc9777bb54cc7d2c15ae7e0d31965e9 /sysdeps/unix/sysv/linux/syscalls.list | |
parent | c5cbdacb8acec54e140c879393c8c7dd658c3488 (diff) | |
download | glibc-9b2cf9482a9397c4711c9e7f42f8d718b6306bdc.tar glibc-9b2cf9482a9397c4711c9e7f42f8d718b6306bdc.tar.gz glibc-9b2cf9482a9397c4711c9e7f42f8d718b6306bdc.tar.bz2 glibc-9b2cf9482a9397c4711c9e7f42f8d718b6306bdc.zip |
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux/syscalls.list')
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 603e517ca6..5f1352ad43 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -67,7 +67,6 @@ swapoff - swapoff i:s __swapoff swapoff unshare EXTRA unshare i:i unshare uselib EXTRA uselib i:s __compat_uselib uselib@GLIBC_2.0:GLIBC_2.23 utime - utime i:sP utime -wait4 - wait4 i:iWiP __wait4 wait4 chown - chown i:sii __libc_chown __chown chown |