[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undetected fatal errors from redirected print

From: Miguel Pineiro Jr.
Subject: Re: Undetected fatal errors from redirected print
Date: Tue, 23 Nov 2021 20:42:49 -0500
User-agent: Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34

On Tue, Nov 23, 2021, at 6:24 PM, Andrew J. Schorr wrote:
> The fclose has to do an implicit fflush, of course, before closing the file. 
> Are
> you suggesting we should call fflush prior to fclose and then issue an error 
> if
> fflush fails (but not if fclose fails)? 

Yes, to distinguish a fatal error in the print statement's output from 
subsequent, unrelated stream closing errors. Perhaps something like do_fflush 
(which understands when a redirection has been declared nonfatal).

Take care,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]