Re: Bash 4.3 no longer handles traps when reading input with read

2014-03-03 Thread Chet Ramey
On 3/3/14 7:47 AM, konsolebox wrote: > On Wed, Feb 19, 2014 at 11:01 PM, Chet Ramey > wrote: > > On 2/19/14 1:51 AM, konsolebox wrote: > > > Bash-4.3 handles signals and traps when a read run by the read > builtin is > > interrupted by a signa

Re: Bash 4.3 no longer handles traps when reading input with read

2014-03-03 Thread konsolebox
Just added correction: On Mon, Mar 3, 2014 at 8:47 PM, konsolebox wrote: > echo "Interacting." > > until read -t 1; do > continue > done > I actually modified that part as well. Results are similar even if not in a loop: echo "Interacting." > > read > Cheers, konsolebox On Mon, Mar 3,

Re: Bash 4.3 no longer handles traps when reading input with read

2014-03-03 Thread konsolebox
On Wed, Feb 19, 2014 at 11:01 PM, Chet Ramey wrote: > On 2/19/14 1:51 AM, konsolebox wrote: > > > Bash-4.3 handles signals and traps when a read run by the read > builtin is > > interrupted by a signal. I'm not sure that's the best thing to do, > > since traps should really be run

Re: Bash 4.3 no longer handles traps when reading input with read

2014-02-19 Thread Chet Ramey
On 2/19/14 1:51 AM, konsolebox wrote: > Bash-4.3 handles signals and traps when a read run by the read builtin is > interrupted by a signal. I'm not sure that's the best thing to do, > since traps should really be run when commands finish, but we're going to > try it. > > S

Re: Bash 4.3 no longer handles traps when reading input with read

2014-02-18 Thread konsolebox
On Mon, Oct 14, 2013 at 2:29 AM, Chet Ramey wrote: > On 10/11/13 6:19 PM, konsolebox wrote: > > On Fri, Oct 11, 2013 at 10:06 PM, Chet Ramey > > wrote: > > > > The SIGCHLD handler was particularly bad, since children can die and > > interrupt > > the shell

Re: Bash 4.3 no longer handles traps when reading input with read

2013-10-13 Thread Chet Ramey
On 10/11/13 6:19 PM, konsolebox wrote: > On Fri, Oct 11, 2013 at 10:06 PM, Chet Ramey > wrote: > > The SIGCHLD handler was particularly bad, since children can die and > interrupt > the shell at any time. As an example, glibc uses internal locks > exte

Re: Bash 4.3 no longer handles traps when reading input with read

2013-10-11 Thread konsolebox
On Fri, Oct 11, 2013 at 10:06 PM, Chet Ramey wrote: The SIGCHLD handler was particularly bad, since children can die and interrupt the shell at any time. As an example, glibc uses internal locks extensively, especially within its malloc implementation, and running trap handlers w

Re: Bash 4.3 no longer handles traps when reading input with read

2013-10-11 Thread Chet Ramey
On 10/11/13 2:47 AM, konsolebox wrote: > Good day, > > It seems like starting 4.3 (beta2) bash already delays handling traps until > read exits. Is this intended? It would be a problem if read has a long > timeout or doesn't have a timeout at all: This is part of a significant rewrite of trap han

Re: Bash 4.3 no longer handles traps when reading input with read

2013-10-10 Thread konsolebox
Sorry I accidentally sent the message immediately. I use this script: catcher() { echo caught. } set -o monitor trap catcher SIGCHLD for (( ;; )); do echo sleeping. sleep 2s & echo reading. read -t 5 echo -- echo waiting. wait don