Le vendredi 22 avril 2005 à 06:37, Randal L. Schwartz écrivait:
> >>>>> "Eric" == Eric Wilhelm <[EMAIL PROTECTED]> writes:
> 
> Eric> Just spent way too much time trying to find a bug when it turns out 
> that 
> Eric> I just had a full disk.  
> 
> I check for errors on close about as often as I check for errors on
> print.

I have at least one shell script that uses a Perl one-liner which DOES
check for errors in print (which happen when the disk is full) to die
early.

Since the one-liner basically reads a file and dipatches the lines
in different files (based on a date field), there is a small period
of time where we have the whole (big) file content duplicated on disk
(before the rest of the shell script removes the old file and goes on
with its business). The shell script dies when the perl one-liner does,
leaving a nice message to be be emailed by the cron daemon. The machine
administrator can then make some room and run the shell script again by
hand.

-- 
 Philippe "BooK" Bruhat

 Some fair deals are fairer than others.
                                   (Moral from Groo The Wanderer #101 (Epic))

Reply via email to