Aazure.548 net.bugs.4bsd utcsrgv!utzoo!decvax!duke!chico!harpo!cbosg!teklabs!tekmdp!azure!randals Wed Feb 17 09:30:24 1982 C-shell fix: too many prompts spoil the code The cshell (according to the documentation, or at least most of the conventions) set the variable "prompt" whenever it needed to output a prompt. This generally was assumed to be whenever interactive input was being taken. However, the cshell missed one case in its checks for whether or not to set a prompt: when commands were being read from "stdin", it still set it. This made command lines like echo foo | csh or csh </dev/ttyx") * Note that in only the login shell is it likely that parent * may have set signals to be ignored */ Lines flagged with "+++" are new. I found the problem when I put some magic code in my .cshrc to do some things when I'm interactive (like set the mail and time variables) and some other things when I'm not. When I queued up a file for "at" (which feeds stuff via stdin to the cshell), my time and mail variables were set! [The magic of software... I will never cease to be surprised.] A brief disclaimer... this new line of code has not had a lot of mileage put on it... we've only had it installed for a short time. No warranties for fitness of use are expressed or implied. Should you be caught using this code, the Secretary of State will disavow all your actions, and issue some incomprehensible press release stating some horrendous obfuscations. Randal L. Schwartz Tektronix Microcomputer Development Products Beaverton, Oregon (OR-ee-gun... not awww-ru-GONE!!) ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.