Add flock when opening $WORKING_RES
Brought to you by:
imacat
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.
The patch file
The GPG signature