[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-mes] mes lib: signal() function; sigaction() function
From: |
Danny Milosavljevic |
Subject: |
[bug-mes] mes lib: signal() function; sigaction() function |
Date: |
Thu, 14 Mar 2019 01:48:30 +0100 |
Hi Janneke,
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).
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.
So I suggest that you remove all mention of SYS_signal and SIG_sigaction.
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?
pgpAgLM1eXvEB.pgp
Description: OpenPGP digital signature
- Re: [bug-mes] ARM mes on wip-arm - Runtime setup, (continued)
- Re: [bug-mes] ARM mes on wip-arm - Runtime setup, Danny Milosavljevic, 2019/03/11
- [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 <=
- Re: [bug-mes] mes lib: signal() function; sigaction() function, Jan Nieuwenhuizen, 2019/03/14
- 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