From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/39513 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: Protect against servers stepping on each other's toes Date: Sat, 20 Oct 2001 00:37:08 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035175212 28398 80.91.224.250 (21 Oct 2002 04:40:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:40:12 +0000 (UTC) Return-Path: Original-Received: (qmail 14535 invoked from network); 19 Oct 2001 22:38:27 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 19 Oct 2001 22:38:27 -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 15uiH9-0005Sd-00; Fri, 19 Oct 2001 17:37:59 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 19 Oct 2001 17:37:36 -0500 (CDT) 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 RAA16893 for ; Fri, 19 Oct 2001 17:37:24 -0500 (CDT) Original-Received: (qmail 14524 invoked by alias); 19 Oct 2001 22:37:42 -0000 Original-Received: (qmail 14519 invoked from network); 19 Oct 2001 22:37:41 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 19 Oct 2001 22:37:41 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id f9JMbEG10014 for ; Sat, 20 Oct 2001 00:37:14 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id AAA12753; Sat, 20 Oct 2001 00:37:09 +0200 (MET DST) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 2565A2019; Sat, 20 Oct 2001 00:37:09 +0200 (CEST) Original-To: ding@gnus.org In-Reply-To: (prj@po.cwru.edu's message of "Fri, 19 Oct 2001 17:49:59 -0400") Original-Lines: 80 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:39513 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:39513 prj@po.cwru.edu (Paul Jarc) writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) wrote: >> If I have two servers using the same directory, there is potential for >> the two stepping on each other's toes. >=20 > I think much of this could be prevented by using different defaults > for different backends, or (like nnmaildir does) by requiring the user > to explicitly specify a directory in the server parameters. It's too late now. Imagine the huge number of people out there with (nnml "") in their gnus-secondary-select-methods. So clearly the default for nnml must be ~/Mail. And then imagine the other huge number of people out there with (nnfolder "") in gnus-secondary-select-methods. So the default for nnfolder must be ~/Mail. Or are you trying to say that all these Gnusae should suddenly stop working unless reconfigured? I think this is not a viable alternative :-| >> Here's a suggestion: when a server is first activated, it writes >> something special to its directory which says what server `owns' that >> directory. >=20 > Are we trying to protect against two servers in two different > Emacsen? If not, we don't need to touch the directory itself. > Something internal to Gnus would do. I mean the same Emacs. The trouble is with people who do this: (add-to-list 'gnus-secondary-select-methods '(nnml "")) (add-to-list 'gnus-secondary-select-methods '(nnfolder "")) See? This is the situation I was thinking about. > Is this indicator supposed to stay there all the time, or will it be > removed when the server is closed? I guess it should be left there -- after all, my "nnml:" server has been owning the ~/Mail directory for many years now, and it's not going to stop tomorrow. >> But even before that, each server looks to see if some other server >> has already written that the directory is `owned' by it. When this >> happens, a warning is issued or something like that. >=20 > There's a race condition there. But that's not a problem for two > servers in the same Emacs. Right. >> Also, maybe we want to put the claiming information inthe active >> file. Maybe in the directory _and_ in the active file? >=20 > Putting it in both wouldn't provide any additional usefullness. > Putting it in the active file would mean we aren't protected against > other Emacsen, but in that case a nonpersistent variable will do; it > doesn't need to be saved anywhere. Maybe some crooked mind does something like this: (add-to-list 'gnus-secondary-select-methods=20 '(nnfolder "a" (nnfolder-directory "/tmp/a") (nnfolder-active-file "/tmp/active"))) (add-to-list 'gnus-secondary-select-methods=20 '(nnfolder "b" (nnfolder-directory "/tmp/b") (nnfolder-active-file "/tmp/active"))) Note how they use different directories but the same active file. But you're right, it seems that it is sufficient to set a variable value, such as gnus-occupied-directories or something like this. kai --=20 GNU/Linux provides a nice `poweroff' command, but where is `poweron'?