You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/10/06 19:06:57 UTC

DO NOT REPLY [Bug 23627] New: - Linux buffer writer doesn't appear to explicitly flush

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23627>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23627

Linux buffer writer doesn't appear to explicitly flush

           Summary: Linux buffer writer doesn't appear to explicitly flush
           Product: Xerces-C++
           Version: 2.3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Utilities
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: sadelson@lads.is.lmco.com


We are using Xerces to read and write the same file from disk.  Rapid accesses
appear to cause crashes in the reader, leading us to suspect that the file is
not completely written to disk before we read it again.

I have added "fsync(fileno((FILE*)theFile))" before the return calls in
util/Platforms/Linux/LinuxPlatformUtils.cpp/XMLPlatformUtils::writeBufferToFile(),
which seems to solve the problem.  If you agree that this is a general and
acceptable solution, you may wish to add it to the distribution for all platforms.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org