delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/10/01/12:48:15

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D8F313858D38
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
:date; bh=Ix3EcdtsI98QCbypMQ53roOad0tp1k98EFyqbQHQUUA=;
b=a6IWBlpgDuJW/M60bXSoEe4CDnD74wCGsCnzt7iraIQDkQw0OtzrsbprEjLDvnxFZ4
2wkWcMntN0SHEIOqzgdaw0Ka1qcYqz5PBIi4AxzMaFcg1hUTQxwysxXTMhu+1dn5H+YA
eC909Qh+4Y1Bzb4ltm1YDQ7EmhOedX6CNF+YlKFQ3U6cyckaB6bWHjaoAI1uVLbXfPAG
G+DtS56Kc00WYGuiHxQe3eVbz0/vHizxTVrQ6m8Fi3+Kqj4u8B9T4GL0A1DwRB/76lTw
BEoc6S7xYwbdsfkPUNfXGkE3yydpBOsL61OdJqfq81VkThOzK1ENeZsxjLm8Z2nKY4rU
99Gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date;
bh=Ix3EcdtsI98QCbypMQ53roOad0tp1k98EFyqbQHQUUA=;
b=D+9BtqB06tzjQLgMd+3dPsmcwtkcf7coNB3sTzERNKhau4KREx5CoYtBRUzxTy324z
OkPBkTP2zUtrPByrIv7RY81qDWRlD8gbyf1dcl5Bt+aTtdNR+Bq0unLVU/xYKersX1mH
614gINWr0o7KBpcpEGyaZ+K2GaxIxzC7TzpYRGFxhX2mCUHYuuj5QW+48Kp3IuFiZ/xm
XL+LmzQEHGq5RIqdoSRcefghbsPnTNjqDYHJVYbFhIeZdTF9Moj7+zsYf/iGVTnQUJe1
p3AEAMxxPNsZk86zWWoNV8yA7h30jAO+CTz6z3vU42N7a2cxGmgvcyGJerIH+b+dhJtN
vSCA==
X-Gm-Message-State: ACrzQf1M9bQs5BDvgv/gAH2ilNJq/PRj2mOMsfWd7BlTyq5wZzsRz8LA
9NEFz81HunBBv9ZKgsemF3kWPV74Rfv/dSfw8WmePa9pOn2EJw==
X-Google-Smtp-Source: AMsMyM5Zb7NfXcw1PxPT7SGCwfcjTNEre9EN8o1dglYGSXpU34XyK3Xmd5gvGQF4yJKqhuNTkxTQx6eyqGy3ItOAy1w=
X-Received: by 2002:a67:f2c1:0:b0:390:e833:762b with SMTP id
a1-20020a67f2c1000000b00390e833762bmr5592950vsn.78.1664642838575; Sat, 01 Oct
2022 09:47:18 -0700 (PDT)
MIME-Version: 1.0
From: Hans Henrik Bergan <divinity76 AT gmail DOT com>
Date: Sat, 1 Oct 2022 18:47:11 -0700
Message-ID: <CAJmy8YH3nHd2hM43bjq=Hg2LYVeef2J46JfNfCpJV3AKEnUb8A@mail.gmail.com>
Subject: Cygwin 3.3.6: PHP's SplFileObject::fwrite seems broken
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF,
FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Level: *
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

running PHP 7.3.7 in Cygwin 3.3.6, and SplFileObject::fwrite seems
completely broken.
to reproduce:
$ touch bug.txt; chmod 0777 bug.txt; php -r '$o=new
SplFileObject("bug.txt");var_dump($o->fwrite("test"));var_dump(error_get_last());'
int(0)
NULL

so both fwrite() and error_get_last() failed to pick up that there was an
error,
but strace reveals:
67 487251 [main] php 1693 __set_errno: ssize_t write(int, const void*,
size_t):1350 setting errno 9
60 487311 [main] php 1693 write: -1 = write(3, 0x6FFFFFE65BF8, 4), errno 9

errno 9 probably means: 9 EBADF Bad file descriptor.

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019