diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-10-30 16:29:42 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-12-04 10:34:03 +0100 |
commit | 5ead4e85f6b58a099269b27def1cd03c4526ae19 (patch) | |
tree | e6f230f0fcef0554b792d9d23e3d8c5d38f4c979 /src/basic/missing_syscall.h | |
parent | 5f152f43d04e5aad6a3f98f45f020a66e3aac717 (diff) | |
download | systemd-5ead4e85f6b58a099269b27def1cd03c4526ae19.tar.gz |
missing: add rt_sigqueueinfo() syscall definition
This is not a new system call at all (since kernel 2.2), however it's
not exposed in glibc (a wrapper is exposed however in sigqueue(), but it
substantially simplifies the system call). Since we want a nice fallback
for sending signals on non-pidfd systems for pidfd_send_signal() let's
wrap rt_sigqueueinfo() since it takes the same siginfo_t parameter.
Diffstat (limited to 'src/basic/missing_syscall.h')
-rw-r--r-- | src/basic/missing_syscall.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h index bea7be699d..cbda3f7c60 100644 --- a/src/basic/missing_syscall.h +++ b/src/basic/missing_syscall.h @@ -562,3 +562,9 @@ static inline int pidfd_send_signal(int fd, int sig, siginfo_t *info, unsigned f #endif } #endif + +#if !HAVE_RT_SIGQUEUEINFO +static inline int rt_sigqueueinfo(pid_t tgid, int sig, siginfo_t *info) { + return syscall(__NR_rt_sigqueueinfo, tgid, sig, info); +} +#endif |