Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110347 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19583 invoked from network); 3 Jun 2020 11:34:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jun 2020 11:34:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 885E01804F2 for ; Wed, 3 Jun 2020 03:16:53 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 ; Wed, 3 Jun 2020 03:16:52 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id 9so1985078ljc.8 for ; Wed, 03 Jun 2020 03:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=81dfadxZDr9dXd+keihVro2kOBpPon8xzYjlKjNQ6e4=; b=svVaEAB1pYHEQz4iwW0URvHW3R9SO7/BlKYf4Ik0nYQ9gCQhTtdysnmn4i6YRnJi0l Cqnas5sdGwY2J+uAiAlLKaaFRD38sKufReWMnJNcFVa67hYUJVA/MLzayDGF7t95PvRL cMzQZyJ5Kb0Qa0CfWLAHOak40lZoYoe+t4oC97p6J1XPFuM3SMkJR8leAHbkKqszXjpK utd8Z1TeyE47MJ15MJvPV45xtGwS+TuuhdWGHTLCotvx6jzDbLv1EJkbCloYbpoWmBZE RpLj+plHiNKWb6wlQ6Z/wF+Jr7NqAiT10JgomrJsKz261hvUGGLL44PTzbQyMr5/7ZqN zjTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=81dfadxZDr9dXd+keihVro2kOBpPon8xzYjlKjNQ6e4=; b=e3qee1KaLLuLzWX3YlqGlM2fj8a6+JZQwxUQKVqxAtvrZ0yL+cVS58UA9qYu/Qod1h 8+sdqKLSxpIN5npOR5xmyFxkGkaWksxufvxNa1iuq9XPctT5bUxSXxvIV9MF8HSYnqyP XZFD7gvqyFiu6SOkhUy0opnSFYGJy90JqcEbBGZE7Vwoo9K8gRTdQKshx4dvjJqAypDF Zwn5nd6AepEmynzj4KOTgsezwOf0ic3bqTYr7i9yCCBIFMFfUW+OcaSgswTpAaesdAmb DleUaz6Q0TN7QsocJr7F95X/hfqPI4yCOaX5Q00p3nwGIacz6TXz0eiOOG+aWzBqC1gQ ihrA== X-Gm-Message-State: AOAM531dwA/l62+ycx6ZuBtLEnFJTbAmZ8il0qefZUvLFG6h4DXsNX44 xUAwq8Qo6nqwe3sy11u4MM8hEExTW3TGVENBGH0= X-Google-Smtp-Source: ABdhPJwJKWfLozEKeCFPuvO1BK5Gr52UFaMo8GvmbWVdRPMs5qzz5lMJrw/1UNkT1bXF/0Bq1LVkQCT9ey/9gebQCeQ= X-Received: by 2002:a2e:9081:: with SMTP id l1mr1812943ljg.81.1591179411402; Wed, 03 Jun 2020 03:16:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 3 Jun 2020 12:16:35 +0200 Message-ID: To: David Gebler Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000009733ce05a72b53c1" Subject: Re: [PHP-DEV] RFC proposal: fsync support for file resources From: nikita.ppv@gmail.com (Nikita Popov) --0000000000009733ce05a72b53c1 Content-Type: text/plain; charset="UTF-8" On Mon, Jun 1, 2020 at 6:57 PM David Gebler wrote: > 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. > No objections from my side. I assume you'd want to add both fsync() and fdatasync()? I think all it takes for this one is a PR... Regards, Nikita --0000000000009733ce05a72b53c1--