diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-12-05 14:56:06 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-12-27 11:18:23 -0300 |
commit | 58bd592536cbf491ff6f89b73b5c95beb4859e42 (patch) | |
tree | 31c1da8a5bd076f72124e2ac56f66a245f420264 /sysdeps/unix/sysv/linux | |
parent | 11519fd0c908df2dad50f36a48eb4d0d12ea83a8 (diff) | |
download | glibc-58bd592536cbf491ff6f89b73b5c95beb4859e42.tar.gz glibc-58bd592536cbf491ff6f89b73b5c95beb4859e42.tar.xz glibc-58bd592536cbf491ff6f89b73b5c95beb4859e42.zip |
Fix return code for __libc_signal_* functions
The functions do not fail regardless of the argument value. Also, for Linux the return value is not correct on some platforms due the missing usage of INTERNAL_SYSCALL_ERROR_P / INTERNAL_SYSCALL_ERRNO macros. Checked on x86_64-linux-gnu, i686-linux-gnu, and sparc64-linux-gnu.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/internal-signals.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/internal-signals.h b/sysdeps/unix/sysv/linux/internal-signals.h index a496c7174c..2932e21fd0 100644 --- a/sysdeps/unix/sysv/linux/internal-signals.h +++ b/sysdeps/unix/sysv/linux/internal-signals.h @@ -59,32 +59,32 @@ static const sigset_t sigall_set = { }; /* Block all signals, including internal glibc ones. */ -static inline int +static inline void __libc_signal_block_all (sigset_t *set) { INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &sigall_set, - set, _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_BLOCK, &sigall_set, set, + _NSIG / 8); } /* Block all application signals (excluding internal glibc ones). */ -static inline int +static inline void __libc_signal_block_app (sigset_t *set) { sigset_t allset = sigall_set; __clear_internal_signals (&allset); INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_BLOCK, &allset, - set, _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_BLOCK, &allset, set, + _NSIG / 8); } /* Restore current process signal mask. */ -static inline int +static inline void __libc_signal_restore_set (const sigset_t *set) { INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (rt_sigprocmask, err, 4, SIG_SETMASK, set, NULL, - _NSIG / 8); + INTERNAL_SYSCALL_CALL (rt_sigprocmask, err, SIG_SETMASK, set, NULL, + _NSIG / 8); } /* Used to communicate with signal handler. */ |