Re: [PATCH v3 36/40] bsd-user/signal.c: implement do_sigaction

2022-01-30 Thread Warner Losh
On Sun, Jan 30, 2022 at 2:19 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/29/22 10:28, Warner Losh wrote: > > +if (block_signals()) { > > +return -TARGET_ERESTART; > > +} > > + > > +k = &sigact_table[sig - 1]; > > +if (oact) { > > +oact->_sa_ha

Re: [PATCH v3 36/40] bsd-user/signal.c: implement do_sigaction

2022-01-30 Thread Richard Henderson
On 1/29/22 10:28, Warner Losh wrote: +if (block_signals()) { +return -TARGET_ERESTART; +} + +k = &sigact_table[sig - 1]; +if (oact) { +oact->_sa_handler = tswapal(k->_sa_handler); +oact->sa_flags = tswap32(k->sa_flags); +oact->sa_mask = k->sa_mask;

[PATCH v3 36/40] bsd-user/signal.c: implement do_sigaction

2022-01-28 Thread Warner Losh
Implement the meat of the sigaction(2) system call with do_sigaction and helper routiner block_signals (which is also used to implemement signal masking so it's global). Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/signal-common.h | 22 +++