X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.4 required=5.0	tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
connect(): No such file or directory
From: david@adboyd.com (J. David Boyd)
Subject: Re: Resizing a terminal window
Date: Fri, 07 May 2010 15:29:05 -0400
Lines: 37
Message-ID: <e8r632z8q9q.fsf@FLM000025LVE9F.catmktg.com>
References: <e8rljbzahnf.fsf@FLM000025LVE9F.catmktg.com>	<4BE0903A.3030207@towo.net>	<e8r6332e5ao.fsf@FLM000025LVE9F.catmktg.com>	<hrs3hq$3pj$1@dough.gmane.org>	<e8raasb8wqc.fsf@FLM000025LVE9F.catmktg.com>	<hs1jge$d9c$1@dough.gmane.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (cygwin)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Hans Horn <hannes@2horns.com> writes:

> David,
>
> This took me forever to figure out!
>
> 'expect' does not forward SIGWINCH
> (http://en.wikipedia.org/wiki/SIGWINCH) unless told to do so.
>
> Add the following snippet (between lines marked with
> ###################) to the beginning of your 'expect' script:
>
> #!/bin/sh
> # \
> exec expect -f "$0" ${1+"$@"}
>
> ###################
> trap { # trap sigwinch and pass it to the child we spawned
>   set rows [stty rows]
>   set cols [stty columns]
>   stty rows $rows columns $cols < $spawn_out(slave,name)
> } WINCH
> ###################
>
> set host [lindex $argv 0]
> ...
>
> I use this to log on from cygwin to various AIX and LINUX machines.
>
> Good luck and let me know how goes,
> Hans


That worked perfectly!  Thank you very much, I don't think I would have
ever figured that out!

Dave


--
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

