autoconf-patches
[Top][All Lists]
Advanced

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

Re: Diagnose write errors in config.status


From: Bruno Haible
Subject: Re: Diagnose write errors in config.status
Date: Fri, 16 Nov 2007 01:08:26 +0100
User-agent: KMail/1.5.4

Ralf Wildenhues wrote:
> I deliberately left out checking all the
>   cat >$CONFIG_STATUS <<...
> 
> for now, my (weak) rationale being that with a write error, the
> config.status file will likely be completely unusable anyway (and my
> other one being laziness for now).  Do you think each one of them should
> be checked as well?

It's not even sufficient to check only the last write, since "disk full"
conditions may disappear as quickly as they appeared. Therefore the
resulting config.status file will have some lines missing. But config.status
is executed later on. If some random lines have been removed from it,
it can overwrite arbitrary files in the system. (Or can you prove that it
will behave harmlessly?)

Also, don't think about speed here. Any performance loss will be caught by
the next CPU generation, but if you leave unchecked writes in the script,
the unreliability will stay there for 10 years or more.

Bruno





reply via email to

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