Make _hurd_raise_signal return errors

* hurd/hurd-raise.c (_hurd_raise_signal): Set errno to error returned
	by __msg_sig_post.
	* hurd/hurd/signal.h (_hurd_raise_signal): Add int return type.
This commit is contained in:
Samuel Thibault 2015-10-10 16:21:41 +02:00
parent 39b3985bed
commit ee0976f7fc
3 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2015-10-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
* hurd/hurd-raise.c (_hurd_raise_signal): Set errno to error returned
by __msg_sig_post.
* hurd/hurd/signal.h (_hurd_raise_signal): Add int return type.
2015-10-09 Joseph Myers <joseph@codesourcery.com> 2015-10-09 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/mips32/libm-test-ulps: Regenerated. * sysdeps/mips/mips32/libm-test-ulps: Regenerated.

View File

@ -24,10 +24,12 @@
If SS is not NULL it is the sigstate for the calling thread; If SS is not NULL it is the sigstate for the calling thread;
SS->lock is held on entry and released before return. */ SS->lock is held on entry and released before return. */
void int
_hurd_raise_signal (struct hurd_sigstate *ss, _hurd_raise_signal (struct hurd_sigstate *ss,
int signo, const struct hurd_signal_detail *detail) int signo, const struct hurd_signal_detail *detail)
{ {
error_t err;
if (ss == NULL) if (ss == NULL)
{ {
ss = _hurd_self_sigstate (); ss = _hurd_self_sigstate ();
@ -46,5 +48,7 @@ _hurd_raise_signal (struct hurd_sigstate *ss,
already marked the signal as pending for the particular thread we already marked the signal as pending for the particular thread we
want. Generating the signal with an RPC might deliver it to some want. Generating the signal with an RPC might deliver it to some
other thread. */ other thread. */
__msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ()); err = __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
return __hurd_fail(err);
} }

View File

@ -233,8 +233,8 @@ extern void _hurdsig_fault_init (void);
sigstate SS points to. If SS is a null pointer, this instead affects sigstate SS points to. If SS is a null pointer, this instead affects
the calling thread. */ the calling thread. */
extern void _hurd_raise_signal (struct hurd_sigstate *ss, int signo, extern int _hurd_raise_signal (struct hurd_sigstate *ss, int signo,
const struct hurd_signal_detail *detail); const struct hurd_signal_detail *detail);
/* Translate a Mach exception into a signal (machine-dependent). */ /* Translate a Mach exception into a signal (machine-dependent). */