http://www.perlmonks.org?node_id=287623


in reply to Re: Re: Re: Mysterious Disapperance of file contents
in thread Mysterious Disapperance of file contents

don't unlock the counterfile/lockfile, just close them. this flushes the buffers and releases locks and closes in a fairly atomic fashion....that's another bug in the original code.

Modern versions of Perl flush file buffers before locking or unlocking a file. This is even documented.

Abigail

  • Comment on Re: Mysterious Disapperance of file contents