From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: [Patch] Resizing shells in shell-mode Date: Sun, 25 May 2008 10:20:04 +0200 Message-ID: <48392134.6050309@swipnet.se> References: <6fa54e4e0805241138s7ca3428ay976f4331b86b89e6@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1211703648 19253 80.91.229.12 (25 May 2008 08:20:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 May 2008 08:20:48 +0000 (UTC) Cc: Antoine Levitt , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 25 10:21:28 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K0BTr-0000iZ-9j for ged-emacs-devel@m.gmane.org; Sun, 25 May 2008 10:21:27 +0200 Original-Received: from localhost ([127.0.0.1]:51102 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0BT6-0006mQ-Dc for ged-emacs-devel@m.gmane.org; Sun, 25 May 2008 04:20:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K0BSf-0006X0-PF for emacs-devel@gnu.org; Sun, 25 May 2008 04:20:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K0BSd-0006Vg-Ly for emacs-devel@gnu.org; Sun, 25 May 2008 04:20:12 -0400 Original-Received: from [199.232.76.173] (port=37664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K0BSd-0006VS-FX for emacs-devel@gnu.org; Sun, 25 May 2008 04:20:11 -0400 Original-Received: from av12-2-sn2.hy.skanova.net ([81.228.8.186]:42165) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K0BSd-0000Ss-NB for emacs-devel@gnu.org; Sun, 25 May 2008 04:20:11 -0400 Original-Received: by av12-2-sn2.hy.skanova.net (Postfix, from userid 502) id 427E03839C; Sun, 25 May 2008 10:20:09 +0200 (CEST) Original-Received: from smtp4-1-sn2.hy.skanova.net (smtp4-1-sn2.hy.skanova.net [81.228.8.92]) by av12-2-sn2.hy.skanova.net (Postfix) with ESMTP id 2C8143839A; Sun, 25 May 2008 10:20:09 +0200 (CEST) Original-Received: from husetbladh.homeip.net (90-231-102-24-no59.tbcn.telia.com [90.231.102.24]) by smtp4-1-sn2.hy.skanova.net (Postfix) with ESMTP id 7793537E42; Sun, 25 May 2008 10:20:08 +0200 (CEST) User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97686 Archived-At: Stefan Monnier skrev: > Problem is: sending "export COLUMNS=%d" won't do the right thing if the > process running currently isn't some bourne derivative. E.g. if it's > `csh' or some completely different process. I think the right thing to do is to set the new size on the pty with ioctl TIOCSWINSZ and then send SIGWINCH to the inferior process. AFAIK, shells react on that to set COLUMNS and LINES. The signal is discarded by default so it does no harm if not caught. Jan D.