public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mintty: WINCH-signal to child
@ 2014-10-18 21:02 Helmut Karlowski
  2014-10-19  8:48 ` Duncan Roe
  0 siblings, 1 reply; 5+ messages in thread
From: Helmut Karlowski @ 2014-10-18 21:02 UTC (permalink / raw)
  To: cygwin


When I run for example an editor from a shell in a mintty-window and  
change the window-size the editor is informed by a WINCH-signal. That is  
good. But the shell it was started from does not know about the change, so  
after exiting the editor the shell uses the old size. Could mintty send a  
WINCH-signal to its direct child (-pgrp) perhaps?

Of course for more complicated situations it could be difficult to inform  
all involved processes when not all have the same pgrp, but it would be  
better than nothing.

Or do I miss something?

-Helmut

--

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: mintty: WINCH-signal to child
  2014-10-18 21:02 mintty: WINCH-signal to child Helmut Karlowski
@ 2014-10-19  8:48 ` Duncan Roe
  2014-10-19 10:11   ` Helmut Karlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Duncan Roe @ 2014-10-19  8:48 UTC (permalink / raw)
  To: cygwin

On Sat, Oct 18, 2014 at 10:02:33PM +0100, Helmut Karlowski wrote:
>
> When I run for example an editor from a shell in a mintty-window and change
> the window-size the editor is informed by a WINCH-signal. That is good. But
> the shell it was started from does not know about the change, so after
> exiting the editor the shell uses the old size. Could mintty send a
> WINCH-signal to its direct child (-pgrp) perhaps?
>
> Of course for more complicated situations it could be difficult to inform
> all involved processes when not all have the same pgrp, but it would be
> better than nothing.
>
> Or do I miss something?
>
> -Helmut
>
bash at least has "shopt -s checkwinsize" to achieve what you want,

Cheers ... Duncan.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: mintty: WINCH-signal to child
  2014-10-19  8:48 ` Duncan Roe
@ 2014-10-19 10:11   ` Helmut Karlowski
  2014-10-19 12:06     ` Thomas Wolff
  0 siblings, 1 reply; 5+ messages in thread
From: Helmut Karlowski @ 2014-10-19 10:11 UTC (permalink / raw)
  To: cygwin

Am 19.10.2014, 09:48 Uhr, schrieb Duncan Roe:

> bash at least has "shopt -s checkwinsize" to achieve what you want,

That would be a workaround for bash. Ideally every process should forward  
the WINCH-signal to its parent, or the terminal should walk through the  
call-tree. Both not very likely to happen.

xterm does the same as mintty BTW.

Thanks,

Helmut

--

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: mintty: WINCH-signal to child
  2014-10-19 10:11   ` Helmut Karlowski
@ 2014-10-19 12:06     ` Thomas Wolff
  2014-10-28 10:49       ` Linda Walsh
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Wolff @ 2014-10-19 12:06 UTC (permalink / raw)
  To: cygwin

Am 19.10.2014 12:11, schrieb Helmut Karlowski:
> Am 19.10.2014, 09:48 Uhr, schrieb Duncan Roe:
>
>> bash at least has "shopt -s checkwinsize" to achieve what you want,
>
> That would be a workaround for bash. Ideally every process should 
> forward the WINCH-signal to its parent, or the terminal should walk 
> through the call-tree. Both not very likely to happen.
>
> xterm does the same as mintty BTW.
There must be something more about it:
Mined does resend a received SIGWINCH to its parent (as an application 
should indeed) and it's actually received by bash as can be confirmed 
with 'trap "echo WINCH" SIGWINCH'. Despite of the received signal bash 
does not adapt its command line width assumption (as can be checked by 
typing a long line and seeing where it wraps) (unless that option is 
enabled).
Probably a bash bug.
Same in mintty as in xterm in all cases.
Same on Linux (bash 3.2.39 on Debian on PowerPC), so not cygwin-specific.
------
Thomas

>
>
> Thanks,
>
> Helmut
>
> -- 
>
> -- 
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: mintty: WINCH-signal to child
  2014-10-19 12:06     ` Thomas Wolff
@ 2014-10-28 10:49       ` Linda Walsh
  0 siblings, 0 replies; 5+ messages in thread
From: Linda Walsh @ 2014-10-28 10:49 UTC (permalink / raw)
  To: cygwin

Thomas Wolff wrote:
> Am 19.10.2014 12:11, schrieb Helmut Karlowski:
>> Am 19.10.2014, 09:48 Uhr, schrieb Duncan Roe:
>>
>>> bash at least has "shopt -s checkwinsize" to achieve what you want,
>>
>> That would be a workaround for bash. Ideally every process should 
>> forward the WINCH-signal to its parent, or the terminal should walk 
>> through the call-tree. Both not very likely to happen.
>>
>> xterm does the same as mintty BTW.
> There must be something more about it:
> Mined does resend a received SIGWINCH to its parent (as an application 
> should indeed) and it's actually received by bash as can be confirmed 
> with 'trap "echo WINCH" SIGWINCH'. Despite of the received signal bash 
> does not adapt its command line width assumption (as can be checked by 
> typing a long line and seeing where it wraps) (unless that option is 
> enabled).
> Probably a bash bug.
> Same in mintty as in xterm in all cases.
> Same on Linux (bash 3.2.39 on Debian on PowerPC), so not cygwin-specific.
----
Do you guys also know there was a change between 4.2 and 4.3 in bash's 
signal handling?  In 4.2, bash used to do child processing inside the 
parent interrupt
which caused problems.  In 4.3, bash waits until a key is pressed before
propagating any signals.

This may be unrelated to whatever problem you are experiencing, but I 
thought
I'd mention you might goog the bash archives on sigwinch and/or winch... 
(not
sure what would be the exact right invocation, but it may not be related
to what you are experiencing anyway...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2014-10-28 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-18 21:02 mintty: WINCH-signal to child Helmut Karlowski
2014-10-19  8:48 ` Duncan Roe
2014-10-19 10:11   ` Helmut Karlowski
2014-10-19 12:06     ` Thomas Wolff
2014-10-28 10:49       ` Linda Walsh

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 read-only IMAP folder(s) and NNTP newsgroup(s).