From ee0976f7fc61f43a7140e100b36be1e05a965c67 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Oct 2015 16:21:41 +0200 Subject: 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. --- hurd/hurd-raise.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hurd/hurd-raise.c') diff --git a/hurd/hurd-raise.c b/hurd/hurd-raise.c index df1e9880cf..3ae6b57147 100644 --- a/hurd/hurd-raise.c +++ b/hurd/hurd-raise.c @@ -24,10 +24,12 @@ If SS is not NULL it is the sigstate for the calling thread; SS->lock is held on entry and released before return. */ -void +int _hurd_raise_signal (struct hurd_sigstate *ss, int signo, const struct hurd_signal_detail *detail) { + error_t err; + if (ss == NULL) { 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 want. Generating the signal with an RPC might deliver it to some 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); } -- cgit v1.2.3