X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 30 Jun 2010 16:29:34 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: default text mode Message-ID: <20100630142934.GA5914@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4C28834A DOT 9040001 AT ivu DOT de> <20100628113502 DOT GD6310 AT calimero DOT vinschen DOT de> <4C288E13 DOT 1090208 AT ivu DOT de> <20100628150342 DOT GF6310 AT calimero DOT vinschen DOT de> <4C2B1AF9 DOT 20909 AT ivu DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4C2B1AF9.20909@ivu.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Jun 30 12:22, Jan Lübbe wrote: > Am 28.06.2010 17:03, schrieb Corinna Vinschen: > >The advice is given in the /etc/fstab file itself: > > > > # For a description of the file format, see the Users Guide > > # http://cygwin.com/cygwin-ug-net/using.html#mount-table > > > > > >Corinna > > > > Which part in that description do you mean? I only find: > > >Note that entries for /, /usr/bin, and /usr/lib are never generated. Looks like you didn't really *read* the section I was refering you to. What about this paragraph: A correct root directory is quite essential to the operation of Cygwin. [...] or this: /usr/bin and /usr/lib are by default also automatic mount points [...] or this: Note that you don't have to specify an fstab entry for the root dir [...] > How can I check wether the files are written to /tmp? In one > directory I got the error > > >sed: preserving permissions for `./sedBHiGtF': Permission denied > > which seems to indicate, that the file is not moved to /tmp, right? Right. Looks like you're using sed to do in-place editing... [...time passes...] Hmm. [...more time passes...] This looks like some kind of Cygwin-specific problem. To create the temporary file, sed calls the mkstemp function. In Cygwin, this function *always* opens the temporary file in binary mode, even if it's on a textmode mount. This has been done so since 2006. The reason is that otherwise applications, which write binary files (a compiler for instance) would create broken results on textmode mounts. Since the mkstemp function has no flags parameter, this is an unsolvable problem. Changing that back to use the mount mode would potentially break lots of applications. While, on the other hand, writing LF output instead of CRLF does not spoil the content of textfiles. There's always a way to convert this to CRLF again, u2d. Or, don't use in-place editing. In the long run I guess I'll add a mkstemp function to sed which opens the file in the mode of the underlying mount point. I added that to my already much too long todo list. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple