1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] out of buffer?
6 <LINK REL=
"Index" HREF=
"index.html" >
7 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20out%20of%20buffer%3F&In-Reply-To=20050125041419.GA18503%40edgemaster.zombie.org">
8 <META NAME=
"robots" CONTENT=
"index,nofollow">
9 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
10 <LINK REL=
"Previous" HREF=
"004775.html">
11 <LINK REL=
"Next" HREF=
"004779.html">
13 <BODY BGCOLOR=
"#ffffff">
14 <H1>[IRCServices] out of buffer?
</H1>
16 <A HREF=
"mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20out%20of%20buffer%3F&In-Reply-To=20050125041419.GA18503%40edgemaster.zombie.org"
17 TITLE=
"[IRCServices] out of buffer?">achurch at achurch.org
19 <I>Tue Jan
25 14:
52:
08 PST
2005</I>
21 <LI>Previous message:
<A HREF=
"004775.html">[IRCServices] out of buffer?
23 <LI>Next message:
<A HREF=
"004779.html">[IRCServices] out of buffer?
25 <LI> <B>Messages sorted by:
</B>
26 <a href=
"date.html#4776">[ date ]
</a>
27 <a href=
"thread.html#4776">[ thread ]
</a>
28 <a href=
"subject.html#4776">[ subject ]
</a>
29 <a href=
"author.html#4776">[ author ]
</a>
34 <PRE>><i>Can't you hold an exclusive lock (flock, lockf, etc) on the database while
35 </I>><i>writing them and then release it when done writing? That way, the
36 </I>><i>`ircservices -export` could try to obtain a shared lock (since it is
37 </I>><i>read-only) and it will spin while the DBs are still being written.
39 True, but since there are several database files that would mean
40 having to check/lock several files, which is inconvenient.
42 On second thought, Services always creates a lock file (.lock by
43 default) in the data directory while it's writing, and refuses to write
44 if the file exists, so you could do something like (in Perl):
46 sysopen LOCK,
"/.../.lock
", O_CREAT|O_EXCL,
0 or die
"locked\n
";
47 system(
"ircservices -export
");
49 unlink
"/.../.lock
";
52 <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org
</A>
53 <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
61 <LI>Previous message:
<A HREF=
"004775.html">[IRCServices] out of buffer?
63 <LI>Next message:
<A HREF=
"004779.html">[IRCServices] out of buffer?
65 <LI> <B>Messages sorted by:
</B>
66 <a href=
"date.html#4776">[ date ]
</a>
67 <a href=
"thread.html#4776">[ thread ]
</a>
68 <a href=
"subject.html#4776">[ subject ]
</a>
69 <a href=
"author.html#4776">[ author ]
</a>