"Guy Lateur" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To be honest, I don't really understand what it means to have the same > file open for writing by several processes. You don't want to modify data > which is already being modified by someone else, do you? I mean, how do > you determine what changes to apply first, and to what version? Or is the > file just constantly being overwritten on a first-come-first-served > basis?
You have identified the reasons an operating system may not allow more than one process to open a file for writing. These are also a major issue with multiuser database systems and multiprogrammer source-code control systems. The overwrite problem exists even with unique access, since one open-write-close can be followed by another open-write-close containing edits based on reading the file before the intervening write, so that the update is to a now obsolete version. Various solutions include locks, checkouts, and conflict notifications. Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list