Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-22 Thread Roberto E. Vargas Caballero
Hi, > > Do you have a reference of a description of this behaviour in an other > > system, > > specification or standard? > > > > C89 (7.7.1.1), C99 (7.14.1.1), POSIX 2001 and 2008 all say that "the > equivalent of signal(sig, SIG_DFL)" may be executed prior to executing > the signal handler

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-21 Thread François-Xavier Carton
On Tue, Jul 19, 2022 at 09:27:35AM +0200, Hiltjo Posthuma wrote: > On Tue, Jul 19, 2022 at 12:05:48AM +0200, François-Xavier Carton wrote: > > Technically, no standard guarantees that the handler stays after being > > called once. The implementation could reset it to the default action. > > One

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-19 Thread Hiltjo Posthuma
On Tue, Jul 19, 2022 at 12:05:48AM +0200, François-Xavier Carton wrote: > On Thu, Jul 14, 2022 at 07:26:40AM +0600, NRK wrote: > > die() calls vprintf, fputc and exit; none of these are > > async-signal-safe, see `man 7 signal-safety`. > > --- > > dwm.c | 4 ++-- > > 1 file changed, 2

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-18 Thread NRK
On Tue, Jul 19, 2022 at 12:05:48AM +0200, François-Xavier Carton wrote: > Technically, no standard guarantees that the handler stays after being > called once. The implementation could reset it to the default action. Hmm, didn't know about that. > One may want to re-add a call to signal here,

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-18 Thread François-Xavier Carton
On Thu, Jul 14, 2022 at 07:26:40AM +0600, NRK wrote: > die() calls vprintf, fputc and exit; none of these are > async-signal-safe, see `man 7 signal-safety`. > --- > dwm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dwm.c b/dwm.c > index 5646a5c..8358fb0 100644 >

Re: [hackers] [dwm][PATCH] do not call signal-unsafe function inside sighanlder

2022-07-15 Thread Hiltjo Posthuma
On Thu, Jul 14, 2022 at 07:26:40AM +0600, NRK wrote: > die() calls vprintf, fputc and exit; none of these are > async-signal-safe, see `man 7 signal-safety`. > --- > dwm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/dwm.c b/dwm.c > index 5646a5c..8358fb0 100644 >