Menu

#1 Add flock when opening $WORKING_RES

open
imacat
None
5
2012-08-24
2002-10-27
imacat
No

Thanks to Chen-hsiu Huang <chenhsiu@gens.dhs.org> for
pointing out this problem to me.

This patch fixes a bug that $WORKING_RES was not locked
when opened. $WORKING_RES is unlocked when closed. On
some systems (like linux) you can request unlock on a
filehandle that is not previous locked, but on some
others (like win32) requesting unlock on a filehande
that is not previous locked will cause error.

$WORKING_RES doesn't really need locking at all. It is
an anonymous temporary file handle, that can be
accessed by this same working process only. It has no
risk of simultaneously writing without threading, and
I'm not doing threading here. I just lock it for a
consistent programming style.

Discussion

  • imacat

    imacat - 2002-10-27

    The patch file

     
  • imacat

    imacat - 2002-10-27

    The GPG signature

     

Log in to post a comment.