Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: Something fundamental - how nov works
Date: Sun, 25 Nov 2001 20:00:37 -0800	[thread overview]
Message-ID: <m1wv0erxju.fsf@reader.newsguy.com> (raw)
In-Reply-To: <87elmmjrm4.fsf@uwo.ca> (Dan Christensen's message of "Sun, 25 Nov 2001 19:36:03 -0500")

Dan Christensen <jdc+news@uwo.ca> writes:

> Harry Putnam <reader@newsguy.com> 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.
 



  reply	other threads:[~2001-11-26  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-25  3:40 Harry Putnam
2001-11-25  4:10 ` Karl Kleinpaste
2001-11-25  4:35   ` Harry Putnam
2001-11-25  6:20 ` Paul Jarc
2001-11-25 11:43 ` Simon Josefsson
2001-11-25 16:43   ` Harry Putnam
2001-11-26  0:36     ` Dan Christensen
2001-11-26  4:00       ` Harry Putnam [this message]
2001-11-27 23:11         ` Dan Christensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1wv0erxju.fsf@reader.newsguy.com \
    --to=reader@newsguy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).