diff options
author | bwarsaw <> | 2003-10-10 04:11:45 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-10-10 04:11:45 +0000 |
commit | 2f52fdfa749e90af7b2d784696bcb39557190a2f (patch) | |
tree | 7bc4968b2034636ceed8c54a50071545a581e471 | |
parent | f527eace6728e075f43d2f2e3d2474a855ae06b6 (diff) | |
download | mailman2-2f52fdfa749e90af7b2d784696bcb39557190a2f.tar.gz mailman2-2f52fdfa749e90af7b2d784696bcb39557190a2f.tar.xz mailman2-2f52fdfa749e90af7b2d784696bcb39557190a2f.zip |
__save(): Flush the file and (depending on SYNC_AFTER_WRITE) fsync it
before closing the config.pck file. Should improve robustness.
Diffstat (limited to '')
-rw-r--r-- | Mailman/MailList.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py index ad3aa7e8..3b9f47b0 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -477,6 +477,9 @@ class MailList(HTMLFormatter, Deliverer, ListAdmin, fp = open(fname_tmp, 'w') # Use a binary format... it's more efficient. cPickle.dump(dict, fp, 1) + fp.flush() + if mm_cfg.SYNC_AFTER_WRITE: + os.fsync(fp.fileno()) fp.close() except IOError, e: syslog('error', |