From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: backup method Date: Sun, 06 Feb 2005 05:29:13 -0500 Message-ID: References: <20050127000210.GA6167@boetes.org> <200501270045.j0R0jIq06197@raven.dms.auburn.edu> <20050127015432.GB6167@boetes.org> <20050128035618.GI6167@boetes.org> <20050129060851.GQ6167@boetes.org> <200501291842.j0TIgVw09020@raven.dms.auburn.edu> <20050129225259.GT6167@boetes.org> <87r7k3zti5.fsf-monnier+emacs@gnu.org> <874qgyxw24.fsf-monnier+emacs@gnu.org> <878y681iga.fsf-monnier+emacs@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1107686791 13365 80.91.229.2 (6 Feb 2005 10:46:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Feb 2005 10:46:31 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 06 11:46:31 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cxjup-0006dp-V6 for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 11:45:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxk8k-0001Lk-2I for ged-emacs-devel@m.gmane.org; Sun, 06 Feb 2005 05:59:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cxk7Q-00018Y-Lw for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:58:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cxk7F-000157-3G for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:58:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cxk7E-0000vr-2I for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:58:08 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxjiO-0006rl-6k for emacs-devel@gnu.org; Sun, 06 Feb 2005 05:32:28 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CxjfF-0008Ma-Rq; Sun, 06 Feb 2005 05:29:14 -0500 Original-To: David Kastrup In-reply-to: (message from David Kastrup on Sat, 05 Feb 2005 11:26:49 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32937 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32937 If the directory permissions are 777, then you can't do any further operation using the file _name_ after doing the creat system call (at which point its name is known and accessible). All you want to do with the file, you have to do via the file descriptor returned by creat. I designed the patch on that basis. The file is written using write-region, and nothing else is written after that. However, it's true that the modes are set separately later on. There is no way to avoid that without further changes in write-region. I don't feel like writing such changes now, but in principle they seem to be needed here.