Modify ↓
Opened at 2010-01-30T13:23:33Z
Closed at 2010-04-13T22:36:41Z
#559 closed enhancement (fixed)
Add O_SYNC to open() when writing XML configuration
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | BitlBee | Version: | devel |
Keywords: | xml configuration | Cc: | |
IRC client+version: | Client-independent | Operating System: | NetBSD |
OS version/distro: | 5.0 |
Description
The XML configuration can get corrupted due to a system crash. Is it worth to pass the O_SYNC flag (or maybe O_DSYNC)?
The attached patch - very simple! - adds the O_SYNC flag to the open(2) call in xml_save(), in storage_xml.c.
Attachments (1)
Change History (3)
Changed at 2010-01-30T13:26:05Z by
Attachment: | storage_xml_O_SYNC.diff added |
---|
comment:1 Changed at 2010-01-30T14:02:52Z by
Actually, it might be better to call fsync(2) just before close(2) instead of passing O_SYNC to open(2).
comment:2 Changed at 2010-04-13T22:36:41Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Add O_SYNC flag to the open(2) call in the