Date: Tue, 30 Mar 1999 22:33:30 +0100 (BST) From: Duncan Barclay <dmlb@ragnet.demon.co.uk> To: freebsd-hackers@freebsd.org Subject: Problem with bin/sh in 3.1 Message-ID: <XFMail.990330223330.dmlb@computer.my.domain>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990330223330.dmlb>