texinfo-devel
[Top][All Lists]
Advanced

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

detecting /dev/full


From: Karl Berry
Subject: detecting /dev/full
Date: Sat, 12 Nov 2011 01:24:31 GMT

            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.

C makeinfo:
$ cmakeinfo sometest.tex -o - >/dev/full; echo $?
fflush error on stdout
1

Perl makeinfo:
$ makeinfo sometest.tex -o - >/dev/full; echo $?
0

Is it possible to handle this reasonably in Perl?

Thanks,
k



reply via email to

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