Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site masscomp.UUCP
Path: utzoo!watmath!clyde!bonnie!masscomp!z
From: z@masscomp.UUCP (Steve Zimmerman)
Newsgroups: net.emacs
Subject: Re: CCA Emacs subshells
Message-ID: <188@masscomp.UUCP>
Date: Mon, 31-Dec-84 09:54:03 EST
Article-I.D.: masscomp.188
Posted: Mon Dec 31 09:54:03 1984
Date-Received: Tue, 1-Jan-85 00:45:47 EST
References: <1192@cca.UUCP>
Organization: Masscomp - Westford, MA
Lines: 21

> I also stumbled upon a
> nasty infinite loop possibility in fflush; the function error() calls
> getchar(), and if the latter encounters an error while doing its stuff
> it calls error() and getchar() and so forth.  The terminal bell rings so
> many times you want to put your fist through the screen.  Anyway, that's
> the reason for the first part of the fix below.

Under normal circumstances, the infinite loop you describe should never
happen.  If this really is a problem, then some code should be put in
getchar() so that it doesn't call error() if it is being invoked by
error().  But the fix that was posted is definitely the wrong thing to
do.  The call to error() in fflush is important, as there are a number
of legitimate reasons for the write to fail, and the user needs to be
notified about them.  For example, if the disk fills up, the old code
would warn the user with a message telling him exactly what happened.
The code represented by the fix would be silent, and the user would get
the disastrously mistaken impression that his file was written
correctly.  For these reasons, I strongly recommend against installing
the first part of the fix that was posted.

	Steve Zimmerman