On 5/22/14, 2:09 PM, Lőrinczy Zsigmond wrote:
> On 2013-10-18 15:39, Chet Ramey wrote:
>> On 10/17/13 9:49 AM, Lőrinczy Zsigmond wrote:
>>   
>>> Hello,
>>>
>>> my bash-3.2.48 (uses readline-6.2) on AIX computer produces stange errors,
>>> that I could trace back:
>>>      
>> Readline-6.3 has undergone fairly extensive changes to signal handling,
>> and does minimal work in the signal handler itself.  The real work is now
>> deferred until it's `safe' to do it.  Bash-4.3 has the same sort of
>> changes.
>>
>> Chet
>>
>>    
> Hello again,
> 
> I've checked readline-6.3, but the problem still exists:
> 
> SIGWINCH->
> signals.c:rl_sigwinch_handler ->

This doesn't call rl_resize_terminal; it sets a flag and calls the
application's SIGWINCH handler, if one is installed.

This flag gets checked at appropriate places in the readline code, and
if it's set, rl_resize_terminal eventually gets called via _rl_signal_handler.

Now, if an application's SIGWINCH handler calls rl_resize_terminal, there's
not really anything readline can do about that.

> terminal.c:rl_resize_terminal ->
> terminal.c:_rl_get_screen_size ->
> shell.c:sh_set_lines_and_columns ->
> libc:setenv ->
> libc:putenv ->
> libc: realloc

All of these functions eventually get called, but not from a signal handler
context.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to