From owner-freebsd-hackers Tue Mar 30 14:34:41 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (Postfix) with ESMTP id 5C12914C25 for ; Tue, 30 Mar 1999 14:34:33 -0800 (PST) (envelope-from dmlb@ragnet.demon.co.uk) Received: from [158.152.46.40] (helo=ragnet.demon.co.uk) by finch-post-12.mail.demon.net with smtp (Exim 2.12 #1) id 10S75J-0007hM-0C for freebsd-hackers@freebsd.org; Tue, 30 Mar 1999 22:34:14 +0000 Received: from dmlb by ragnet.demon.co.uk with local (Exim 1.82 #1) id 10S68Y-0000K6-00; Tue, 30 Mar 1999 22:33:30 +0100 Content-Length: 1629 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 30 Mar 1999 22:33:30 +0100 (BST) From: Duncan Barclay To: freebsd-hackers@freebsd.org Subject: Problem with bin/sh in 3.1 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all Before I go on a what is likely to be a long bug hunt I wondered if anyone can point me in the right direction. I've just upgraded from 2.2.6 to 3.1. In my .env file for bin/sh I have if [ x$TERM = xxterm -o x$TERM = xxterm-color ]; then _WSIZE=$(stty -a | sed -n -e '1s/.*; \([0-9]*\) rows; \([0-9]*\).*/\2x\1/p') _winch(){ _WSIZE=$(stty -a | sed -n -e '1s/.*; \([0-9]*\) rows; \([0-9]*\).*/\2x\1/p') _statusline } trap _winch 28 ... fi _statusline is a shell function to change the xterm's title bar which includes the window size in the title. Under 2.2.6 this works fine. Under 3.1 the shell process gets stuck in an infinte loop somewhere when it rus the _winch function. I have reduced the above to the failing test case if [ x$TERM = xxterm -o x$TERM = xxterm-color ]; then _TTY=$(tty) trap "stty -a -f $_TTY" 28 fi This only appears to happen when stty is used in the trap action and it occurs AFTER stty has been run, i.e. I see the output of stty -a in the xterm. Also it is the shell looping, ps(1) says that it is in waiting on "wait". I pulled the 2.2.6 shell out from the CVS tree and compiled it under 3.1. It worked fine. stty hasn't been touched. There have been significant changes in 3.1's usr/src/bin/sh/trap.c. Would this be the best place to start tracking this down in? Duncan --- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@ragnet.demon.co.uk | the alcoholics, and the permanently stoned. ________________________________________________________________________ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message