[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] readline() in 7.0 seems to interfere with blocked SIG
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] readline() in 7.0 seems to interfere with blocked SIGALRM |
Date: |
Mon, 23 Jan 2017 10:28:36 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 |
On 1/20/17 1:07 PM, Frédéric Brière wrote:
> [ I don't have much experience with either readline or signals, so ]
> [ please forgive any ignorance (or stupidity) on my part. :) ]
>
>
> readline 7.0 is causing a bug[*] in Twinkle, where we are normally
> blocking SIGALRM in all threads, with one thread dedicated to calling
> sigwait(). Upon calling readline(), SIGALRM now apparently becomes
> unblocked (or caught and rethrown, I guess), resulting in the program
> aborting. This was not the case with 6.3.
It's readline-7.0 using pselect to allow read() to be interrupted by
signals that don't usually interrupt it (e.g., SIGWINCH). Since
readline only modifies the signal mask temporarily while installing
signal handlers, here's a one-line patch that will allow this to work.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/
readline-pselect-sigmask.patch
Description: Source code patch