From nobody Fri Sep 2 10:49:53 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MJvnF6W7Bz4bhsN for ; Fri, 2 Sep 2022 10:49:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MJvnF52mWz3x30 for ; Fri, 2 Sep 2022 10:49:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MJvnF3qpLznLR for ; Fri, 2 Sep 2022 10:49:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 282Anrm9090611 for ; Fri, 2 Sep 2022 10:49:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 282Anr35090610 for bugs@FreeBSD.org; Fri, 2 Sep 2022 10:49:53 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266171] Writing to stdout after moving file descriptor 1 Date: Fri, 02 Sep 2022 10:49:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: takimoto-j@kba.biglobe.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.mimetype attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662115793; 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=yoPb5I6T7ksLXPolmClbJTgOS45Cab2dfRWFj7xUni0=; b=YOGaoOmgbmu4mzChYG0zoHxdA1sTWzWP6qv0FCA3Apam/8t/KTCFMGi7+f06vPm3yb67D0 OIsaICTdn5AIplsoiXComRR82vGOTYVr3cMJpJNmiLSjsCXKVF7kBGEELN6CsktDknAbrI yAHl8C3BqcydRUod56xRBnhW5NaJlgGaEAie4DUeKfxUihocvKU8srdFXW9ggcEZEhIph2 5JTxHzk71w0+rp6k0ZADkkkYCyffuFHZIUZDwDe0XwRmonaGEa+vnHgBb7ZbiwrutbA6Rm Jft0wwuJ27sV1mDA4fn71OT0MlQvjKMykbTlow1FH5nsDaF7iENQWGAibeI7Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662115793; a=rsa-sha256; cv=none; b=ayi3msMNdNM7jZzWB1E9cGGqc8Z2Cr6HnCQRX3xFLEC2mSg5+ODe3jVbfmfgXmqzkL9b/b Pbzt27+pVHkrjsy8E7c+SsLe19F7ezcYB5WmFm1u6xTmJhjixeJrq7xn0vMyCu5OoUQNFI S2YWJtNl2PJnSXhaWngScmNFd1p9zT97/8gA9qxdS0tTLme9V4QgHNdQNqk8BePvGHDxs+ W+tss8RIc5w5AJRGbge2Lihoj6AsU8W8Eriv4bqrOCXroWS8rKif/jXXFrN2xw767x5kJ6 ka6xJrdsVNZbXv5N97szUoC3OUgdQ10QDQeROwuOWDWl2e2WUd+jLhtcTP3DIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266171 Bug ID: 266171 Summary: Writing to stdout after moving file descriptor 1 Product: Base System Version: 13.1-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: takimoto-j@kba.biglobe.ne.jp Attachment #236309 text/plain mime type: Created attachment 236309 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D236309&action= =3Dedit minimum reproducer The attached C program gives different output on 13.0 and 13.1. On 13.1, it gives: fflush: Bad file descriptor foo end But on 13.0 (and on Linux and macOS) the line 'foo' is not output. I think this is the correct behavior since file descriptor 1 is closed when printf("foo\n") is called. I've noticed this problem while testing zsh. If you build zsh (9.0) and run 'make check' then test A04 will fail on 13.1 due to this problem. --=20 You are receiving this mail because: You are the assignee for the bug.=