Revert "cygwin/signal.h: Remove SI_QUEUE unimplemented comment"
This reverts commit 54ed68a781
.
This commit is contained in:
parent
54ed68a781
commit
f41d402bd4
|
@ -265,7 +265,8 @@ enum
|
||||||
SI_MESGQ, /* sent by real time mesq state change
|
SI_MESGQ, /* sent by real time mesq state change
|
||||||
(currently unimplemented) */
|
(currently unimplemented) */
|
||||||
SI_TIMER, /* sent by timer expiration */
|
SI_TIMER, /* sent by timer expiration */
|
||||||
SI_QUEUE, /* sent by sigqueue */
|
SI_QUEUE, /* sent by sigqueue (currently
|
||||||
|
unimplemented) */
|
||||||
SI_KERNEL, /* sent by system */
|
SI_KERNEL, /* sent by system */
|
||||||
|
|
||||||
ILL_ILLOPC, /* illegal opcode */
|
ILL_ILLOPC, /* illegal opcode */
|
||||||
|
|
|
@ -623,26 +623,6 @@ sigwaitinfo (const sigset_t *set, siginfo_t *info)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
__SYS_rt_sigqueueinfo (pid_t pid, int sig, siginfo_t *si)
|
|
||||||
{
|
|
||||||
pinfo dest (pid);
|
|
||||||
if (!dest)
|
|
||||||
{
|
|
||||||
set_errno (ESRCH);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (sig == 0)
|
|
||||||
return 0;
|
|
||||||
if (sig < 0 || sig >= NSIG
|
|
||||||
|| !si || si->si_code < SI_ASYNCIO || si->si_code > SI_KERNEL)
|
|
||||||
{
|
|
||||||
set_errno (EINVAL);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return sig_send (dest, *si);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: SUSv3 says that this function should block until the signal has
|
/* FIXME: SUSv3 says that this function should block until the signal has
|
||||||
actually been delivered. Currently, this will only happen when sending
|
actually been delivered. Currently, this will only happen when sending
|
||||||
signals to the current process. It will not happen when sending signals
|
signals to the current process. It will not happen when sending signals
|
||||||
|
@ -651,10 +631,23 @@ extern "C" int
|
||||||
sigqueue (pid_t pid, int sig, const union sigval value)
|
sigqueue (pid_t pid, int sig, const union sigval value)
|
||||||
{
|
{
|
||||||
siginfo_t si = {0};
|
siginfo_t si = {0};
|
||||||
|
pinfo dest (pid);
|
||||||
|
if (!dest)
|
||||||
|
{
|
||||||
|
set_errno (ESRCH);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (sig == 0)
|
||||||
|
return 0;
|
||||||
|
if (sig < 0 || sig >= NSIG)
|
||||||
|
{
|
||||||
|
set_errno (EINVAL);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
si.si_signo = sig;
|
si.si_signo = sig;
|
||||||
si.si_code = SI_QUEUE;
|
si.si_code = SI_QUEUE;
|
||||||
si.si_value = value;
|
si.si_value = value;
|
||||||
return __SYS_rt_sigqueueinfo (pid, sig, &si);
|
return sig_send (dest, si);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
|
|
Loading…
Reference in New Issue