From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10529 invoked from network); 10 Dec 1997 07:08:26 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 10 Dec 1997 07:08:26 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id BAA17090; Wed, 10 Dec 1997 01:47:03 -0500 (EST) Resent-Date: Wed, 10 Dec 1997 01:47:03 -0500 (EST) From: "Bart Schaefer" Message-Id: <971209224735.ZM11949@candle.brasslantern.com> Date: Tue, 9 Dec 1997 22:47:35 -0800 X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh@peak.org Subject: PATCH: 3.0.5: terminal size should not be reset by zsh -c Cc: zsh-workers@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"Tfj7g2.0.yA4.chZZq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3649 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Stack trace leading to the bug: #7 0x804a0ee in ___crt_dummy__ () #6 0x8070ddf in main () at init.c:69 #5 0x8072392 in setupvals () at init.c:618 #4 0x807e2cd in createparamtable () at params.c:115 #3 0x808137d in setsparam () at params.c:1010 #2 0x8080af7 in setstrvalue () at params.c:827 #1 0x8081a7b in zlevarsetfn () at params.c:1247 #0 adjustwinsize () at utils.c:882 Breakpoint 1, adjustwinsize (from=2) at ../../zsh-3.0.5/Src/utils.c:882 Suggested fix: Index: Src/utils.c =================================================================== RCS file: /extra/cvsroot/zsh/zsh-3.0/Src/utils.c,v retrieving revision 1.10 diff -c -r1.10 utils.c *** utils.c 1997/11/19 16:40:31 1.10 --- utils.c 1997/12/10 06:37:12 *************** *** 876,882 **** termflags |= TERM_NARROW; #ifdef TIOCGWINSZ ! if (from >= 2) { shttyinfo.winsize.ws_row = lines; shttyinfo.winsize.ws_col = columns; ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize); --- 876,882 ---- termflags |= TERM_NARROW; #ifdef TIOCGWINSZ ! if (interact && from >= 2) { shttyinfo.winsize.ws_row = lines; shttyinfo.winsize.ws_col = columns; ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize); I'm not entirely sure that "if (zleactive && from >= 2)" wouldn't be a more appropriate test, but this one gets the job done. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com