[GRASS5] gis lib: write error function (put_row.c)

Gordon Keith gordon.keith at csiro.au
Tue Oct 22 18:04:16 EDT 2002


On Tue, 22 Oct 2002 18:25, Markus Neteler wrote:
> Hi,
>
> while having the problem that a disk run out of space
> while using r.in.gdal, I found that
>
> write_error()
> in src/libes/gis/put_row.c
> just contains G_warning() and not G_fatal_error().
>
> Are there objections to change this to
> G_fatal_error("...unable to write row...")
> ?
>
> It doesn't make much sense to continue writing to a full disk.

BUT, you can't clean up after G_fatal_error.

If you run out of disk space the first thing you want to do is delete 
temporary raster files. If you call G_fatal_error the temporary file is 
left in place, aggrevating the problem.

(Did I mention I had problems with a script that had a faulty region 
setting and the whole thing failed because s.to.rast called 
G_fatal_error when it failed to write a row and left a 2GB file in the 
.tmp directory. After a few attempts at this my disk was full and the 
script was failing because there wasn't any disk space.)

Regards 
Gordon

-- 

Gordon Keith
Programmer/Data Analyst
Marine Acoustics
CSIRO Marine Research
http://www.marine.csiro.au

The main thing is to keep the main thing the main thing.




More information about the grass-dev mailing list