Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110326 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83248 invoked from network); 1 Jun 2020 18:15:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jun 2020 18:15:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B8283180507 for ; Mon, 1 Jun 2020 09:57:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, T_SPF_TEMPERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Jun 2020 09:57:14 -0700 (PDT) Received: by mail-ot1-f52.google.com with SMTP id v13so1728854otp.4 for ; Mon, 01 Jun 2020 09:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HGrp121T+JzDI+l4ZOrF3zFwTRnRAZuDRXZ3xqMtGvg=; b=bvx9ZD0cFVhwjYNuqmoX9DYgTOjRCSYvqOvHgGb5CFgy6iyuNozae+cee9vXIulWhG eOwI0E9POWssi65cHnnxuBGE2OnPIXB6aorfAB9W/8nx5FubDEE7ux1M0cvKU9wMiyOF 6HHIH18jKISAwEhlgYReGW/iYsJSXa2Lr688wcgow8EOnbJcP4bw0m/hNsUthyv/lTtK hZkE6KcNm+A0zCtzdxKN1qIk2kSbKrf0IyqwUpJ8aVAjupZEExKEJNlbsdvW+w9uRNxf 8zB5foQVipgBHP+d786/7Nu3TvS2rpWRCJxljAsD1VC/v3V/JWNtS2NU/IrjtilFvj/t Mrgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HGrp121T+JzDI+l4ZOrF3zFwTRnRAZuDRXZ3xqMtGvg=; b=ZeuzU0qR/2MY+7An4ei+fUkunoGLG9C6HMRrIzUREfiRDx5kZprN9SCIE+7NF5Gor+ FPfkQhDmuncGGONH10GpHHJAZgd/H7s0c2UwXv4lXvIGv0BBHXn6C2gkabIcj0uXQTIr 3yL4KwQDcak1eZ4HkRhiHZW1cTNI+p2QJPBuLactjEn93VqeF3FFsCWECLjj1GdDtCpL q/zo3IZa+hp05FlCdPbU+nTJvuxNS8vfhZqR52VKWGoL4vqiULppP8SWt5+WqP+Hd3Ft TkZD3YndefLxGQgZZ14Csr2d2UK6LP0UIZrdqmJmHou5X8MTt88iRILnDJLLAz66O9IA w/AA== X-Gm-Message-State: AOAM531/qdolC/se1XWIH2vefZdkpNtDAxd+Tp+T5HL6RvDIt/Bae8m7 PRQtaWHgCimcOfWB0bRKyThk3X9tS6ku/5IP9KYSVA== X-Google-Smtp-Source: ABdhPJxxXE3dBisBxORT7iFt42Boss1g0nGVeGqshenXmw2mS4w0+zE19fTnmEbeGiiQg0gpMOwNp17QgSxA2Z7t6GE= X-Received: by 2002:a9d:2253:: with SMTP id o77mr17101897ota.236.1591030631619; Mon, 01 Jun 2020 09:57:11 -0700 (PDT) MIME-Version: 1.0 Date: Mon, 1 Jun 2020 17:56:56 +0100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000009fe2a005a708af1f" Subject: RFC proposal: fsync support for file resources From: davidgebler@gmail.com (David Gebler) --0000000000009fe2a005a708af1f Content-Type: text/plain; charset="UTF-8" Exactly as the subject says, I would like to propose an RFC for adding an fsync() function for file resources, which would in essence be a thin wrapper around C's fsync on UNIX systems and _commit on Windows. It seems to me an odd oversight that this has never been implemented in PHP and means PHP has no way to perform durable file write operations, making it inherently unsuitable for any systems requiring more intensive I/O, mission critical logs, auditing, etc. I am not really a C programmer and I have been able to implement a simple working prototype of this as a compiled extension in merely a few hours, so I'm sure it wouldn't be difficult to bring in to the language core where the functionality really belongs. Every other major programming language otherwise comparable to PHP in features supports a way of providing durability. Thanks. --0000000000009fe2a005a708af1f--