From patchwork Sun Aug 16 12:47:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FX Coudert X-Patchwork-Id: 507687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AE329140134 for ; Sun, 16 Aug 2015 22:48:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=TX5WdZyV; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; q=dns; s=default; b=nqFyB4IAMNydFOoRioBULXo N1w/ZY9ys6WpzEHQ8yZjW8FvXM5LqR5grJnaVTE0v9Pm4LcIHHqtrkZhMx/1crm4 Xrb9hJZlturzGGPDt5RG+hceN4UL63I4FTkGmvmi6yOG10PRf0jCEa9Ax8y5Wdig kBJin9FxMX1I6V+0y89I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; s=default; bh=4d7D45EYDqWYQTUiErE7wjJ/BRg=; b= TX5WdZyVUnWqiWZMxyW6obQhDudXHJ56xywb1sDW+xNwzwr01qt8og5q/Bfq0lsc sV2mmotKpx1BvxONw6JUpSMsLsxxAmwb2t3113Ueu/5hN9wW1U6InKF2Okr9tfsO WzsbhrcdhGsdAjmky9XqkMU/+X8EnKsG7lv2XgbIHEE= Received: (qmail 6104 invoked by alias); 16 Aug 2015 12:48:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 6041 invoked by uid 89); 16 Aug 2015 12:48:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_05, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 16 Aug 2015 12:48:01 +0000 Received: by wijp15 with SMTP id p15so54648550wij.0; Sun, 16 Aug 2015 05:47:59 -0700 (PDT) X-Received: by 10.180.105.36 with SMTP id gj4mr25019364wib.64.1439729279034; Sun, 16 Aug 2015 05:47:59 -0700 (PDT) Received: from [192.168.0.104] (95-210-220-206.ip.skylogicnet.com. [95.210.220.206]) by smtp.gmail.com with ESMTPSA id 4sm17115027wjt.46.2015.08.16.05.47.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 16 Aug 2015 05:47:57 -0700 (PDT) From: FX Subject: [fortran,committed] Document behavior of I/O on symbolic links Date: Sun, 16 Aug 2015 14:47:44 +0200 Message-Id: <0D82934E-CD79-41FE-9625-B39840C0BC2C@gmail.com> Cc: gfortran To: gcc-patches Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Committed attached patch as rev. 226923 to document the behavior of gfortran when opening & closing symbolic links. Clearing up some of the old libgfortran PRs... FX Index: ChangeLog =================================================================== --- ChangeLog (revision 226922) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2015-08-16 Francois-Xavier Coudert + + PR fortran/41387 + * gfortran.texi: New section "File operations on symbolic links". + 2015-08-08 Francois-Xavier Coudert PR fortran/67059 Index: gfortran.texi =================================================================== --- gfortran.texi (revision 226894) +++ gfortran.texi (working copy) @@ -1140,6 +1140,7 @@ might in some way or another become visi * Thread-safety of the runtime library:: * Data consistency and durability:: * Files opened without an explicit ACTION= specifier:: +* File operations on symbolic links:: @end menu @@ -1345,6 +1346,33 @@ processor dependent. GNU Fortran behave @end enumerate +@node File operations on symbolic links +@section File operations on symbolic links +@cindex file, symbolic link + +This section documents the behavior of GNU Fortran for file operations on +symbolic links, on systems that support them. + +@itemize + +@item Results of INQUIRE statements of the ``inquire by file'' form will +relate to the target of the symbolic link. For example, +@code{INQUIRE(FILE="foo",EXIST=ex)} will set @var{ex} to @var{.true.} if +@var{foo} is a symbolic link pointing to an existing file, and @var{.false.} +if @var{foo} points to an non-existing file (``dangling'' symbolic link). + +@item Using the @code{OPEN} statement with a @code{STATUS="NEW"} specifier +on a symbolic link will result in an error condition, whether the symbolic +link points to an existing target or is dangling. + +@item If a symbolic link was connected, using the @code{CLOSE} statement +with a @code{STATUS="DELETE"} specifier will cause the symbolic link itself +to be deleted, not its target. + +@end itemize + + + @c --------------------------------------------------------------------- @c Extensions @c ---------------------------------------------------------------------