robic0 wrote about software liabilities: > If the software opens a file and is in the middle of writing to it, > then the user dumps the power to the machine and ends up having to > reformat, thereby losing all his data, at what point does the > liability stop? And how is fault proven or dished out? Does the > law specifically state "repeatability" in its language?
This question is hardly unique to software. All manufacturers and suppliers have to deal with the question of what is covered by warranty. But it is possible to code defensively. For instance, instead of writing directly to the user's file, you should write to a temporary file, then when the write is complete, you rename the temp file to the "real" file. On some OSes that can be an atomic operation, but even if it is not, your danger zone where a power failure can cause the user to lose data is strongly reduced. As a general rule, closed source software suppliers have a terrible reputation for responding to bug reports quickly and in good faith. It sometimes seems that the bigger and more successful the software supplier is, the more likely they are to sit on bug reports, doing nothing to fix them, and threaten to sue if you disclose -- all the more so if it is a security exploit. Follow-ups to comp.lang.python please. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list