[2304] in Athena Bugs

home help back first fref pref prev next nref lref last post

/usr/athena/lib/init/aliases interaction with csh bug

daemon@ATHENA.MIT.EDU (geer@ATHENA.MIT.EDU)
Wed May 31 10:10:41 1989

From: <geer@ATHENA.MIT.EDU>
Date: Wed, 31 May 89 08:55:39 EDT
To: bugs@ATHENA.MIT.EDU
Cc: tytso@ATHENA.MIT.EDU
there is a well known csh bug that evaluates all
conjunctive conditionals in an if statement.  the
if statement in /usr/athena/lib/init/init_aliases
fails on that bug as follows:

	% rsh paris date
--->	term: Undefined variable.
	Wed May 31 08:50:30 EDT 1989

this is due to line 18:

	if ($?term && $term =~ xterm*) then

evaluating the $term regardless of whether the
$?term evaluates true or not.

fix follows.

--dan


*** /usr/athena/lib/init/aliases	Tue Feb  7 14:06:53 1989
--- /tmp/aliases	Wed May 31 08:47:03 1989
***************
*** 15,20 ****
  
  # Aliases for the X window system
  
! if ($?term && $term =~ xterm*) then
!         alias xresize 'set noglob; eval `resize` || unset noglob'
  endif
--- 15,22 ----
  
  # Aliases for the X window system
  
! if ($?term) then
! 	if ($term =~ xterm*) then
!         	alias xresize 'set noglob; eval `resize` || unset noglob'
! 	endif
  endif

home help back first fref pref prev next nref lref last post