zsh-workers
 help / color / mirror / code / Atom feed
* SIGWINCH not respected when terminal size is unchanged
@ 2018-07-26 13:42 Sheheryar Parvaz
  2018-07-26 16:03 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Sheheryar Parvaz @ 2018-07-26 13:42 UTC (permalink / raw)
  To: zsh-workers

This breaks software such as abduco and dtach, as they call SIGWINCH upon reattaching.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGWINCH not respected when terminal size is unchanged
  2018-07-26 13:42 SIGWINCH not respected when terminal size is unchanged Sheheryar Parvaz
@ 2018-07-26 16:03 ` Bart Schaefer
  2018-07-26 16:10   ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2018-07-26 16:03 UTC (permalink / raw)
  To: zsh-workers; +Cc: Sheheryar Parvaz

On Thu, Jul 26, 2018 at 6:42 AM, Sheheryar Parvaz <skipper308@hotmail.ca> wrote:
> This breaks software such as abduco and dtach, as they call SIGWINCH upon reattaching.

Sorry, could you explain exactly what you mean by "not respected" and
what breakage you observe?

The signal is certainly always trapped, and zsh always checks that
LINES and COLUMNS match the values returned by TIOCGWINSZ, so the only
internal difference is whether a reset of the line editor occurs.
Other processes are not blocked from receiving the signal.  So what
exactly is wrong?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGWINCH not respected when terminal size is unchanged
  2018-07-26 16:03 ` Bart Schaefer
@ 2018-07-26 16:10   ` Peter Stephenson
  2018-07-26 16:36     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2018-07-26 16:10 UTC (permalink / raw)
  To: zsh-workers

On Thu, 26 Jul 2018 09:03:21 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Thu, Jul 26, 2018 at 6:42 AM, Sheheryar Parvaz
> <skipper308@hotmail.ca> wrote:
> > This breaks software such as abduco and dtach, as they call
> > SIGWINCH upon reattaching.  
> 
> Sorry, could you explain exactly what you mean by "not respected" and
> what breakage you observe?
> 
> The signal is certainly always trapped, and zsh always checks that
> LINES and COLUMNS match the values returned by TIOCGWINSZ, so the only
> internal difference is whether a reset of the line editor occurs.
> Other processes are not blocked from receiving the signal.  So what
> exactly is wrong?

I was going to ask that, but looking at the code I *suspect* that
the line's not being redrawn, which indeed doesn't happen if the
configuration didn't change.  But this needs confirming.

If that's the case, I'm wondering if there's a reason why the code's
like that --- didn't we have to deal with floods of SIGWINCHs causing
havoc at one point?

pws


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGWINCH not respected when terminal size is unchanged
  2018-07-26 16:10   ` Peter Stephenson
@ 2018-07-26 16:36     ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2018-07-26 16:36 UTC (permalink / raw)
  To: zsh-workers

On Thu, Jul 26, 2018 at 9:10 AM, Peter Stephenson
<p.stephenson@samsung.com> wrote:
> On Thu, 26 Jul 2018 09:03:21 -0700
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>>
>> Sorry, could you explain exactly what you mean by "not respected" and
>> what breakage you observe?
>
> I was going to ask that, but looking at the code I *suspect* that
> the line's not being redrawn, which indeed doesn't happen if the
> configuration didn't change.  But this needs confirming.

Could the line not being redrawn really be described as having broken
the session manager application?

If that's actually the issue, then it should be work-around-able by
something like

TRAPWINCH() { zle -I }

> If that's the case, I'm wondering if there's a reason why the code's
> like that --- didn't we have to deal with floods of SIGWINCHs causing
> havoc at one point?

Yes, in desktop managers where resizing a window provides live
feedback, the shell will receive a rapid stream of SIGWINCHes as the
user drags the window border around.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: SIGWINCH not respected when terminal size is unchanged
@ 2018-07-27  1:33 Sheheryar Parvaz
  0 siblings, 0 replies; 5+ messages in thread
From: Sheheryar Parvaz @ 2018-07-27  1:33 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers


> Sorry, could you explain exactly what you mean by "not respected" and 
> what breakage you observe? 

If I start an abduco session with zsh running, then disconnect and reconnect from the session, zsh does not redraw the prompt, leaving an empty terminal. If the terminal size is different upon reconnection, then zsh does redraw the prompt.

Abduco relies on programs redrawing when calling SIGWINCH. If they don't, then abduco just shows no output.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-27  1:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 13:42 SIGWINCH not respected when terminal size is unchanged Sheheryar Parvaz
2018-07-26 16:03 ` Bart Schaefer
2018-07-26 16:10   ` Peter Stephenson
2018-07-26 16:36     ` Bart Schaefer
2018-07-27  1:33 Sheheryar Parvaz

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).