bug in csh

eric%cit-vax at sri-unix.UUCP eric%cit-vax at sri-unix.UUCP
Thu Feb 2 08:41:28 AEST 1984


From:  Eric Holstege <eric at cit-vax>

Under 4.2, if the terminal is in raw mode (for example, an editor just bombed)
the first character with the high (parity) bit set will log out the csh.
This is because, in the routine bgetc in sh.lex.c, a character is read
from the terminal and returned as an integer. This causes sign extension
of the parity bit, resulting in a negative integer. Routines calling
bgetc test for < 0 to detect EOF. The fix is to chaange the two occurrences
of "return(c)" in bgetc to "return(c&0177)".
 



More information about the Comp.unix.wizards mailing list