[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-mes] mes lib: signal() function; sigaction() function
From: |
Jan Nieuwenhuizen |
Subject: |
Re: [bug-mes] mes lib: signal() function; sigaction() function |
Date: |
Thu, 14 Mar 2019 07:41:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Danny Milosavljevic writes:
Hi Danny,
> I've fixed signal handling in mes on ARM mostly (it still crashes AFTER the
> signal handler has been called--but at least it calls it now for the first
> time).
Ah, that's progress.
> I'm pretty sure that sa_mask (and sigset_t itself) has to be large enough
> for 64 bits, also on i386 and on x86-64.
>
> There are three possible syscalls in Linux in order to set up signal handlers,
>
> * SYS_signal
> * SYS_sigaction
> * SYS_rt_sigaction
>
> The first and oldest one is a remnant of a time long past where the MIT
> school of design used non-restartable handlers because they were easier
> to implement--and I suggest that we do not support it.
>
> glibc doesn't support it either. It always registers restartable handlers
> on signal().
>
> The second one is better and has BSD signal semantics (which are non-insane).
>
> The third one is almost entirely like the second one but they found out that
> they need more than 32 signals and thus extended sigset_t.
I didn't take the time to look into this, so your summary really helps,
thanks!
> So I suggest that you remove all mention of SYS_signal and SIG_sigaction.
Yes, I agree.
> We already implement signal() in terms of SYS_rt_sigaction, but there's a
> strange fallback to SYS_signal which only serves to hide problems in the
> former. I suggest you remove the fallback.
>
> Also, there's an empty stub for sigaction() which we can just implement
> in its entirety, copying pretty much the body of signal() from
> lib/linux/signal.c .
>
> (The only difference between sigaction() and SYS_rt_sigaction() is that the
> latter has an extra argument "sizeof(sigset_t)" at the end but the former
> doesn't)
>
> What do you think?
I chose to implement that which looked simplest, and oldest and until
now it worked :-) Time to clean such things up.
janneke
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com
- [bug-mes] ARM mes on wip-arm - Assertion failure, (continued)
- [bug-mes] ARM mes on wip-arm - Assertion failure, Danny Milosavljevic, 2019/03/11
- Re: [bug-mes] ARM mes on wip-arm - Assertion failure, Danny Milosavljevic, 2019/03/11
- Re: [bug-mes] ARM mes on wip-arm - Assertion failure, Danny Milosavljevic, 2019/03/11
- Re: [bug-mes] ARM mes on wip-arm - Assertion failure, Jan Nieuwenhuizen, 2019/03/11
- [bug-mes] ARM mes on wip-arm - Test failure: Division with negative operands, Danny Milosavljevic, 2019/03/11
- [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/11
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/11
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Jan Nieuwenhuizen, 2019/03/12
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/13
- [bug-mes] mes lib: signal() function; sigaction() function, Danny Milosavljevic, 2019/03/13
- Re: [bug-mes] mes lib: signal() function; sigaction() function,
Jan Nieuwenhuizen <=
- Re: [bug-mes] mes lib: dtoab, Danny Milosavljevic, 2019/03/14
- Re: [bug-mes] mes lib: dtoab, Jan Nieuwenhuizen, 2019/03/14
- Re: [bug-mes] mes lib: abtod, Danny Milosavljevic, 2019/03/15
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Jan Nieuwenhuizen, 2019/03/14
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/13
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/13
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/13
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Danny Milosavljevic, 2019/03/13
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Jan Nieuwenhuizen, 2019/03/14
- Re: [bug-mes] ARM mes on wip-arm - Other test failures, Jan Nieuwenhuizen, 2019/03/14