Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!tektronix!midas!copper!michaelk From: michaelk@copper.TEK.COM (Michael D. Kersenbrock) Newsgroups: comp.sources.bugs Subject: Re: tcsh 5.4 bugs Message-ID: <1632@copper.TEK.COM> Date: 15 Jan 88 23:45:13 GMT References: <107@gsg.UUCP> Reply-To: michaelk@copper.UUCP (Michael D. Kersenbrock Organization: Tektronix Inc., Beaverton, Or. Lines: 65 Keywords: Another tcsh bug shellIn article <107@gsg.UUCP> lew@gsg.UUCP (Paul Lew) writes: Summary: Expires: Sender: Followup-To: >Anyone know/fix this one? > > > tcsh -f > >will "core dump", and leave terminal setting in strange state. >csh -f works fine. I ran adb to find out why and I could not >get out because EOF char was mapped to NIL char!! >-- >---------------------------------------------------------------------- >Paul Lew {olivea,harvard,decvax}!gsg!lew (UUCP) >General Systems Group, 5 Manor Parkway, Salem, NH 03079 (603) 893-1000 A quick fix is the following patch (which causes Ed_init() to be called even with the -f). The core dump happens on line 48 of ed.refresh.c (the first line of code in Vdraw() ). Seems to fix the problem. *** sh.C Fri Jan 15 15:21:52 1988 --- sh.c Fri Jan 15 15:23:46 1988 *************** *** 503,508 */ setexit(); haderr = 0; /* In case second time through */ if (!fast && reenter == 0) { reenter++; if (!fast && !arginp && !onelflg) { /* PWP setup stuff */ --- 503,513 ----- */ setexit(); haderr = 0; /* In case second time through */ + + if (reenter == 0 && !arginp && !onelflg) { + ed_Init(); /* init the new line editor */ + } + if (!fast && reenter == 0) { reenter++; /* Will have value("home") here because set fast if don't */ *************** *** 505,514 haderr = 0; /* In case second time through */ if (!fast && reenter == 0) { reenter++; - if (!fast && !arginp && !onelflg) { /* PWP setup stuff */ - ed_Init(); /* init the new line editor */ - /* PWP: setup the editor BEFORE doing .cshrc, else bugs! */ - } /* Will have value("home") here because set fast if don't */ srccat(value("home"), "/.cshrc"); /* upward compat. */ if (!fast && !arginp && !onelflg) --- 510,515 ----- if (!fast && reenter == 0) { reenter++; /* Will have value("home") here because set fast if don't */ srccat(value("home"), "/.cshrc"); /* upward compat. */ if (!fast && !arginp && !onelflg) -- Mike Kersenbrock Tektronix Microcomputer Development Products Aloha, Oregon