Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-04 Thread Chet Ramey
On 3/2/15 9:29 AM, Dave Wysochanski wrote: > I agree this is what is happening - the signal handler loops around > pathologically trying the same operation and getting the same result. > Can you explain why the problem is intermittent? I can reproduce it but > not always. It's a race condition:

Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-02 Thread Dave Wysochanski
On Sun, 2015-03-01 at 20:14 -0500, Chet Ramey wrote: > On 2/27/15 12:10 PM, Dave Anderson wrote: > > > > This issue was first reported with respect to the crash utility, > > which is an interactive program that uses the readline library. > > > > The problem occurs only if the crash utility is r

Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-02 Thread Hans Lub
2015-03-02 2:14 GMT+01:00 Chet Ramey : > Any ideas are welcome. > I have never thought very deeply about this, but rlwrap (which uses the alternate interface and has its own signal handlers) remains suspended in the SIGTSTP signal handler (by resetting the SIGTSTP disposition and then sending a S

Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-02 Thread Hans Lub
2015-03-02 10:47 GMT+01:00 Hans Lub : > and defers the restoring until after wakeup (cf signals.c > ). > Now I realize that rlwrap doesn't restore terminal attributes after a SIGTSTP, and will leave them modified when killed by a

Re: [Bug-readline] Problem with CTRL-z and readline()

2015-03-01 Thread Chet Ramey
On 2/27/15 12:10 PM, Dave Anderson wrote: > > This issue was first reported with respect to the crash utility, > which is an interactive program that uses the readline library. > > The problem occurs only if the crash utility is run from within > an executable bash script, i.e., like so: > >