texinfo-devel
[Top][All Lists]
Advanced

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

Re: detecting /dev/full


From: Patrice Dumas
Subject: Re: detecting /dev/full
Date: Sun, 13 Nov 2011 21:28:57 +0100
User-agent: Mutt/1.4.2.2i

On Sat, Nov 12, 2011 at 01:24:31AM +0000, Karl Berry wrote:
>             Don't close STDOUT when outputting Info.
> 
> Um.  One of the things that the C programs go to some trouble to do is
> to detect disk-full conditions on redirection (using the gnulib closeout
> module -- it's unfortunately nontrivial).  As far as I know, the only
> reliable way to do this is to close stdout at the end of the program and
> see if the close returns an error.

Agreed.  Jim did a very good talk about that in the GHM in Paris.

> Perl makeinfo:
> $ makeinfo sometest.tex -o - >/dev/full; echo $?
> 0
> 
> Is it possible to handle this reasonably in Perl?

For now close error are not checked anywhere in texi2any, even for non
STDOUT files...  This is clearly bad.  I am fixing that.
One question, though.  When there is some error upon closing a filehandle,
should the processing stop in every cases, or should we try to continue
except when keeping on do not make sense?

A possible workaround the perl message about 
 'Filehandle STDOUT reopened as FH only for input' 
could be to close STDOUT at the very end of texi2any run.  But this is
a bit annoying because it doesn't fit with the current organization
of the API, so I will certainly ponder a bit about that.

-- 
Pat



reply via email to

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