]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices/2005/004776.html
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices / 2005 / 004776.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2 <HTML>
3 <HEAD>
4 <TITLE> [IRCServices] out of buffer?
5 </TITLE>
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">
12 </HEAD>
13 <BODY BGCOLOR="#ffffff">
14 <H1>[IRCServices] out of buffer?</H1>
15 <B>Andrew Church</B>
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
18 </A><BR>
19 <I>Tue Jan 25 14:52:08 PST 2005</I>
20 <P><UL>
21 <LI>Previous message: <A HREF="004775.html">[IRCServices] out of buffer?
22 </A></li>
23 <LI>Next message: <A HREF="004779.html">[IRCServices] out of buffer?
24 </A></li>
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>
30 </LI>
31 </UL>
32 <HR>
33 <!--beginarticle-->
34 <PRE>&gt;<i>Can't you hold an exclusive lock (flock, lockf, etc) on the database while
35 </I>&gt;<i>writing them and then release it when done writing? That way, the
36 </I>&gt;<i>`ircservices -export` could try to obtain a shared lock (since it is
37 </I>&gt;<i>read-only) and it will spin while the DBs are still being written.
38 </I>
39 True, but since there are several database files that would mean
40 having to check/lock several files, which is inconvenient.
41
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):
45
46 sysopen LOCK, &quot;/.../.lock&quot;, O_CREAT|O_EXCL, 0 or die &quot;locked\n&quot;;
47 system(&quot;ircservices -export&quot;);
48 close LOCK;
49 unlink &quot;/.../.lock&quot;;
50
51 --Andrew Church
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>
54 </PRE>
55
56
57 <!--endarticle-->
58 <HR>
59 <P><UL>
60 <!--threads-->
61 <LI>Previous message: <A HREF="004775.html">[IRCServices] out of buffer?
62 </A></li>
63 <LI>Next message: <A HREF="004779.html">[IRCServices] out of buffer?
64 </A></li>
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>
70 </LI>
71 </UL>
72
73 </body></html>