csh history bug

Professor Fate strike at convex.UUCP
Tue Apr 26 05:00:54 AEST 1988


I have fixed this bug.

Csh uses the value "-1000" to mark internal, temporary history events
created during substitutions. When history is very large as in "set
history=2000", the set of events to keep is much larger and subsequent
history processing will include the temporary events.

These temporary events are usually thrown away after each command because
csh asks: if (history counter - event number) > history value, then toss
this event. If history value  ~ 2000, and event number = -1000 ( ==>
temporary), you can see why the shell would choose to keep the temp event.

To apply the fix, change the last return statement in function dosub() in
file sh.lex.c to return -32767 instead of -1000. This will allow history
to be set to ~32767 (Big!) without errors.

M
-- 
Finally then, I will read you your rights... You have the right to remain 
silent. You are warned that anything you say can and will be taken down and 
used as evidence against you.  Listen to this. Run.
					-The Clash "Know Your Rights"



More information about the Comp.bugs.4bsd.ucb-fixes mailing list