Re: approach to async-signal safety in bash

2020-07-01 Thread Chet Ramey
On 7/1/20 2:18 PM, Godmar Back wrote: > I did a little experiment, changing find_process to assert that SIGCHLD is > blocked (like the accompanying comment demands). > This fails on one of the provided unit tests for me, for instance: Thanks. I think it's possible for a SIGCHLD to arrive during t

Re: approach to async-signal safety in bash

2020-07-01 Thread Godmar Back
On Wed, Jul 1, 2020 at 10:58 AM Chet Ramey wrote: > > > Looking at the bash 5.0 code, I see some comments in the code about > > strategies to protect the jobs array and other data structures from > > arriving SIGCHLD signals, but I have questions about, for instance, > these: > > > > - printable_

Re: approach to async-signal safety in bash

2020-07-01 Thread Chet Ramey
On 6/30/20 4:28 PM, Godmar Back wrote: > Hi, > > I'm trying to understand what approach bash takes to async-signal safety in > its design. I'm always interested in this kind of analysis, since signal handling conflicts can be a ripe source of deadlocks -- think glibc and its dozens of internal lo