[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing terminal raises additional signal

From: vcoxvco
Subject: Re: Resizing terminal raises additional signal
Date: Mon, 02 Feb 2015 19:49:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/01/2015 01:33 AM, Thomas Dickey wrote:
Disabling the whole _nc_signal_handler() function might provide some
additional insight - at least, to see if the signal handlers are the issue,
or some other function such as nanosleep() is related.

I tested a little bit in this direction and found that the problem is
related to code in


In line 312ff we have:

    if (sig != SIGWINCH)           <=====================
        new_act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
    new_act.sa_handler = handler;

Commenting out the line

    if (sig != SIGWINCH)

makes my code work as expected, i.e. I explicitly set the restart flag
also in case of SIGWINCH -  when the system() call returns, KEY_RESIZE
is delivered correctly.

So, is there any specific reason not to set the restart flag
in case of SIGWINCH?
(Except maybe for the calling application being able to react immediately on SIGWINCH - but this would be counterproductive
if - as in my case - the application called by system() has its own
signal handler for this purpose)


Signal 18 was a wrong direction and most probably some kind of
side effect - at least I could reproduce the original problem
w/o signal 18 being raised.

V. Courzakis
email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]