From owner-freebsd-hackers Tue May 18 12: 6: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.wxs.nl (smtp05.wxs.nl [195.121.6.57]) by hub.freebsd.org (Postfix) with ESMTP id B2E8B14F88 for ; Tue, 18 May 1999 12:05:59 -0700 (PDT) (envelope-from asmodai@wxs.nl) Received: from daemon.ninth-circle.org ([195.121.196.56]) by smtp05.wxs.nl (Netscape Messaging Server 3.61) with ESMTP id AAA27A for ; Tue, 18 May 1999 21:05:53 +0200 Received: from daemon.ninth-circle.org (abaddon@daemon [192.168.0.1]) by daemon.ninth-circle.org (8.9.3/8.9.3) with ESMTP id VAA00489 for ; Tue, 18 May 1999 21:06:20 +0200 (CEST) (envelope-from asmodai@wxs.nl) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 18 May 1999 21:06:19 +0200 (CEST) Organization: Ninth Circle Enterprises From: Jeroen Ruigrok/Asmodai To: FreeBSD Hackers Subject: FW: Question on rename() Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Could you guys please give yer own opinions on that? I will compile some of the better arguments and resend them to the Posix revision list... -----FW: <990518120639.ZM1866@tamarix.rdg.opengroup.org>----- Date: Tue, 18 May 1999 13:06:40 +0100 From: Andrew Josey To: austin-group@opengroup.org Subject: Question on rename() All, The following question was raised to my attention. I'd appreciate thoughts on this and recommendations on the next step best regards Andrew --- Forwarded mail In POSIX 1003.1 1996 in 5.5.3.2 there is the rather unfortunate part "If the old argument and the new argument both refer to links to the same existing file, the rename() function shall return successfully and perform no other action.". In SUSV2 it is stated that "If the old argument and the new argument both refer to, and both link to the same existing file, rename() returns successfully and performs no other action." People are quite bothered by the fact that the Linux kernel follows this, possibly too literally. One consequence is that after a successful rename("aa", "bb"); it is possible that aa still exists, i.e., that stat("aa", &buf); still succeeds. Another is that on a filesystem where filenames are case-sensitive upon readdir() and creat() but case-insensitive for open(), it may be impossible to do rename("austin","Austin"); and rename("austin","aux"); rename("aux","Austin"); would be required. The rationale does not mention such strange cases and just says that the sentence is meant to ensure that rename("x", "x"); does not remove the file x. ------------------------------------------------------ ---End of forwarded mail ----- Andrew Josey The Open Group Austin Group Chair Apex Plaza,Forbury Road, Email: a.josey@opengroup.org Reading,Berks.RG1 1AX,England Tel: +44 118 9508311 ext 2250 Fax: +44 118 9500110 --------------End of forwarded message------------------------- --- Jeroen Ruigrok van der Werven asmodai(at)wxs.nl The FreeBSD Programmer's Documentation Project Network/Security Specialist *BSD: Accept no limitations... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message