in reply to Re^5: Writing to a log file without colliding
in thread Writing to a log file without colliding

There is a race condition in append mode in Win32. Your test case must just not race fast enough / close enough. BTW, binmode reduces the window size for the race.

- tye        

  • Comment on Re^6: Writing to a log file without colliding (Win32 >> race)

Replies are listed 'Best First'.
Re^7: Writing to a log file without colliding (Win32 >> race)
by BrowserUk (Patriarch) on Aug 17, 2004 at 16:51 UTC

    Indeed, you are correct. That's a shame, it would have been useful to me.

    Removing the delay and upping the line count to 10,000 eventually showed some corruption creeping in.

    With regard to the binmode, I was under the impression that ':raw' was equivalent to it. Especially inconjuction with syswrite?


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon