From patchwork Mon Dec 9 19:16:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1206560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107876-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="vUTztSIu"; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="S6YDU0uF"; dkim-atps=neutral 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 47WtG81Qg4z9s4Y for ; Tue, 10 Dec 2019 06:16:15 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=F4q nsRxLmhdpQDG58zdhr/EI9JPuO6vS3MpwNCYn/LFmEGQqHtrZsut3ZRjuOJs9KAK Z4CPy9tRqT9wwxR6bprWy3ShJVnZjDGprp6/c65hKQCljb1fUdbRZf42JXcQkPFs HUqVXjdtZIB1M5SZcGINsY/Kk56E7Cf8YUKsyCsI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=f4CNnXLd2 Xgy7NJ5iVgCYAsDBhc=; b=vUTztSIuXesrYz60L157HK3kTXYsQDTxG5N7VEEUE D6/zycPGpKUABBRCe1xwUgqVD8OHsOrIpBJQUYtN3Uwn5cYOI3qlNyCt8TIciVg8 zDDtXDlYkCR55xnuJgKoglTRqBxfMbuIVITmA6nGZNIwN1jBQ8kxysPAwi+VkTqV ow= Received: (qmail 87620 invoked by alias); 9 Dec 2019 19:16:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 87611 invoked by uid 89); 9 Dec 2019 19:16:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT autolearn=ham version=3.3.1 spammy=mandatory, modifier, @samp, 2167 X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575918966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FSOcFy8b+C1zYXXuO7A9ip+xcnEmy/16zDAXfCYDjyA=; b=S6YDU0uFdochxd4Pgm6SsOW9vQ3KzU0KIPVyPbpdcPnZ07Hg8Y2ANPN0xjwt6+HYYFGwpm CQJAUhlQFf5EAN6PIRpCY1iDqPaKWSchDuHMjymc/tCUfjQDqX6lKmxtVZXNWGZ/6YPAyP e4oDV2lUxaofjDY/0AIMOPVSdxIpCvM= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] manual: fopen with the x flag does not follow ISO C11 Date: Mon, 09 Dec 2019 20:16:02 +0100 Message-ID: <877e3571jh.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 ISO C11 requires that the new file is created locked, something that our implementation does not do. Changing that would impact backwards compatibility, particularly if the C11 requirement of “exclusive (also known as non-shared) access to the extent that the underlying system supports exclusive access” is read to imply mandatory locking. ----- manual/stdio.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manual/stdio.texi b/manual/stdio.texi index bbd3061bab..33a0250a9a 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -216,7 +216,11 @@ exists, @code{fopen} fails rather than opening it. If you use file. This is equivalent to the @code{O_EXCL} option to the @code{open} function (@pxref{Opening and Closing Files}). -The @samp{x} modifier is part of @w{ISO C11}. +@strong{Portability Note:} Some standards describe the @samp{x} +specifier with different semantics, requiring that exclusive, +mandatory file locking is enabled for the new file. The +implementation in @theglibc{} follows existing practice and only +passes the @code{O_EXCL} flag to the kernel. @end table The character @samp{b} in @var{opentype} has a standard meaning; it