diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2017-08-03 14:55:21 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-08-03 14:55:21 +0200 |
commit | f41d402bd44b6c1f1a1b17129cec24216b148dc8 (patch) | |
tree | 4427251fed49f634675a1ac6aff62df1d87ff1c6 /winsup/cygwin/signal.cc | |
parent | 54ed68a781fe8a36d08352503524e61534a25e07 (diff) | |
download | newlib-f41d402bd44b6c1f1a1b17129cec24216b148dc8.zip newlib-f41d402bd44b6c1f1a1b17129cec24216b148dc8.tar.gz newlib-f41d402bd44b6c1f1a1b17129cec24216b148dc8.tar.bz2 |
Revert "cygwin/signal.h: Remove SI_QUEUE unimplemented comment"
This reverts commit 54ed68a781fe8a36d08352503524e61534a25e07.
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 4b63e99..fbd2b24 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -623,9 +623,14 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info) return res; } -int -__SYS_rt_sigqueueinfo (pid_t pid, int sig, siginfo_t *si) +/* FIXME: SUSv3 says that this function should block until the signal has + actually been delivered. Currently, this will only happen when sending + signals to the current process. It will not happen when sending signals + to other processes. */ +extern "C" int +sigqueue (pid_t pid, int sig, const union sigval value) { + siginfo_t si = {0}; pinfo dest (pid); if (!dest) { @@ -634,27 +639,15 @@ __SYS_rt_sigqueueinfo (pid_t pid, int sig, siginfo_t *si) } if (sig == 0) return 0; - if (sig < 0 || sig >= NSIG - || !si || si->si_code < SI_ASYNCIO || si->si_code > SI_KERNEL) + if (sig < 0 || sig >= NSIG) { set_errno (EINVAL); return -1; } - return sig_send (dest, *si); -} - -/* FIXME: SUSv3 says that this function should block until the signal has - actually been delivered. Currently, this will only happen when sending - signals to the current process. It will not happen when sending signals - to other processes. */ -extern "C" int -sigqueue (pid_t pid, int sig, const union sigval value) -{ - siginfo_t si = {0}; si.si_signo = sig; si.si_code = SI_QUEUE; si.si_value = value; - return __SYS_rt_sigqueueinfo (pid, sig, &si); + return sig_send (dest, si); } extern "C" int |