in reply to file handling question
As for reading config files (it took me a while to get the connection between the first and second paragraph)... If you're worried that a process reading a config file might get an incomplete or "transient" version of the data -- and if this is a persistent, pernicious concern -- you might consider making up a little table (database or flat file) that stores file names with data checksums. Read the file once, compute its checksum, and if that doesn't match the checksum in the table, treat it as an error condition. (You could try reading it again after a delay, to see if the problem persists, but if it fails twice, you might as will quit.)
This would require a little more infrastructure for managing your config files, to make sure that the checksum table is updated every time a file is intentionally added, deleted or altered.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: file handling question
by simonm (Vicar) on Dec 17, 2003 at 06:43 UTC | |
by smackdab (Pilgrim) on Dec 17, 2003 at 07:24 UTC | |
by graff (Chancellor) on Dec 17, 2003 at 17:59 UTC |