From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40532 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: Something fundamental - how nov works Date: Sun, 25 Nov 2001 20:00:37 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87elmmjrm4.fsf@uwo.ca> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176068 1426 80.91.224.250 (21 Oct 2002 04:54:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:54:28 +0000 (UTC) Return-Path: Original-Received: (qmail 23998 invoked from network); 26 Nov 2001 05:51:14 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 26 Nov 2001 05:51:14 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 168Ef0-00083V-00; Sun, 25 Nov 2001 23:50:30 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 25 Nov 2001 23:50:16 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id XAA18016 for ; Sun, 25 Nov 2001 23:49:58 -0600 (CST) Original-Received: (qmail 23968 invoked by alias); 26 Nov 2001 05:50:08 -0000 Original-Received: (qmail 23963 invoked from network); 26 Nov 2001 05:50:07 -0000 Original-Received: from smtp.newsguy.com (HELO newsguy.com) (209.155.56.71) by gnus.org with SMTP; 26 Nov 2001 05:50:07 -0000 Original-Received: from reader.local.lan (adsl-66.51.210.228.dslextreme.com [66.51.210.228]) by newsguy.com (8.9.1a/8.9.1) with ESMTP id VAA83631 for ; Sun, 25 Nov 2001 21:49:38 -0800 (PST) Original-Received: (from reader@localhost) by reader.local.lan (8.11.6/8.11.6) id fAQ5nbU03272; Sun, 25 Nov 2001 21:49:37 -0800 X-Authentication-Warning: reader.local.lan: reader set sender to reader@newsguy.com using -f Original-To: ding@gnus.org In-Reply-To: <87elmmjrm4.fsf@uwo.ca> (Dan Christensen's message of "Sun, 25 Nov 2001 19:36:03 -0500") User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i586-pc-linux-gnu) Original-Lines: 51 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40532 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40532 Dan Christensen writes: > Harry Putnam writes: > >> By writing the data in mbox format to a spool where gnus thinks it is >> procmail output, slurps it and writes it to the nnml group. > > That's what you should do. > >> A problem I considered there is the event where my script is writing >> to the procmail like spool when gnus is slurping. I guess that is >> where locking of some kind comes up. > > Right. > >> [...] >> lockfile ~/spool/todo.in.lock >> ..[ script action part]... >> rm -f ~/spool/todo.in.lock >> [...] > > This is correct, except that maybe you should check whether lockfile > succeeds. (It could be killed while waiting.) For example: [...] > All that "locked" means is that future calls to lockfile will wait > until the lock file is removed. In one window, type "lockfile foo". > In another, type "lockfile foo". This will wait. In the first > window, type "rm -f foo" and you will see the second lockfile return. Too bad the man page lacks this clear description. Now I get the idea a little better. > The idea is that all programs that access the file xxx first > run lockfile on xxx.lock. OK, that seems kind of lame really since it depends on all apps that might access a file, playing nicely. But anyway in the instant case, does that mean that gnus must be told to run lockfile before it begins to slurp? Or does gnus know about that already? Example: I run my homeboy script and it is writing to $FILE Gnus' cron driven batch fetch rolls around and starts fetching right about that time. My homeboy script has preceeded its write to $FILE with a call to lockfile but hasn't yet finished. Do I need to do something more to prevent bad things happening in that scene? OR does gnus DTR by itself.