summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-17 21:41:04 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-17 21:41:04 +0800
commite867f159ccc71da85abb336417ce6b6769bf80ba (patch)
tree81abfc60e6bb9225f8636b9ce0cec168d046feee /mbbsd
parent39b097d8003fafc8895952187e6216be3f9db4ca (diff)
downloadpttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar.gz
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar.bz2
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar.lz
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar.xz
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.tar.zst
pttbbs-e867f159ccc71da85abb336417ce6b6769bf80ba.zip
move flock to another place
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@700 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/voteboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c
index 18ee5854..eac92529 100644
--- a/mbbsd/voteboard.c
+++ b/mbbsd/voteboard.c
@@ -1,4 +1,4 @@
-/* $Id: voteboard.c,v 1.16 2003/03/17 12:34:15 victor Exp $ */
+/* $Id: voteboard.c,v 1.17 2003/03/17 13:41:04 victor Exp $ */
#include "bbs.h"
#define VOTEBOARD "NewBoard"
@@ -69,7 +69,6 @@ do_voteboardreply(fileheader_t * fhdr)
if ((fd = open(oldfpath, O_RDONLY)) == -1)
return;
- flock(fd, LOCK_EX);
fp = fopen(fpath, "w");
@@ -121,6 +120,7 @@ do_voteboardreply(fileheader_t * fhdr)
unlink(fpath);
return;
}
+ flock(fd, LOCK_EX);
i = 0;
while (fp) {