Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site l5.uucp Path: utzoo!watmath!clyde!cbosgd!ihnp4!mhuxn!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!lll-crg!well!ptsfa!l5!gnu From: gnu@l5.uucp (John Gilmore) Newsgroups: net.sources.bugs Subject: Re: Possible bug in less Message-ID: <266@l5.uucp> Date: Wed, 13-Nov-85 04:52:32 EST Article-I.D.: l5.266 Posted: Wed Nov 13 04:52:32 1985 Date-Received: Fri, 15-Nov-85 04:39:45 EST References: <781@whuxl.UUCP> Organization: Nebula Consultants in San Francisco Lines: 16 Summary: This is because stdin is not /dev/tty In article <781@whuxl.UUCP>, qtest@whuxl.UUCP (QTEST) writes: > I think I've found a bug in less. > 1) cat filename | less > 2) less filename > If the command "!sh" is entered, command type 1) will wait for a few seconds > and then return "!done (press RETURN)". The problem is that "less" just forks a shell, passing standard input, output, and error to it (and any other files it has open). If the standard input of "less" is the output of "cat", this (or whatever part of it "less" hasn't read) will be the input to the shell. I have a fix for this but I didn't keep separate diffs. I've been working on "less" and will send all my changes to mod.sources someday. I don't think the fix is really urgent. If you have to, just use the "!sh