From nobody Fri Dec 15 18:57:49 2023 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 4SsJPp2lJWz53wqX for ; Fri, 15 Dec 2023 18:57:50 +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 4SsJPp0gfzz3NDr for ; Fri, 15 Dec 2023 18:57:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702666670; a=rsa-sha256; cv=none; b=YKdOpHrz+Aa1RgFwgWJilTWFoEAh6QTfNGEJ3yfXLfUeEi88zL5qq8lo1QXE11vg6xt71U f0z9BMyQqfi8+iAFDW9QRc1fkSWtdcedeVg+wxKpOZjTq1TTpBb/Tipmfj2QABvS88O48U fX5RcMFTQvbjw89JAX8HeZjsAQ2Py+e2xSF4e941SbCIKl8w5aL9IVFwDqzjrm/uN9yG9G UVOEkXYwKDP73jlHklLIdTddUd9SVTlMQ5e7DiePnBWl6e7YKEGHhcN2CIPyGbw5Ovgwok ll/04KBG7o+z5x0X2Y2yLLA0mkOZdO4Z1VWUeFZOrcr39gvVMPPoDPLfzV/BLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702666670; 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: in-reply-to:in-reply-to:references:references; bh=H6O3muFpYgowacZI5+zlMDWtUxPmnVmKBYSFxZla2s4=; b=vQOPIMt64FISAMWidbdIFtNfYad7oQZG0PffThz9+/Xba2Ek47FXfOtAiWK+EitG5YhAZV K1bdG9/dTH8KBuqx3qu7QrPjP0HHUy1a+qKl3cPUYEx+zkK4s1tW8Azqi9QGGGk3S9X71p d4wfS4Cm187jxrBKpGuFdxDUqDpYNZhvNhNUmaxqqy9RUye1tmojHCFJktZpkQwgtnIY0A jsJWqvHME1niLNgjiAXUOugcbRZi9TmWGRAfirvAF0EqLyLVbFyBQGylLK66LxZ92uKETz ELPozb2LOZxxOdogRMBs67X5t1re274FdzRXMEWPI/U4MJxcuXXfwUKIlRFxAA== 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 4SsJPn6sQyz7Pv for ; Fri, 15 Dec 2023 18:57:49 +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 3BFIvncr049493 for ; Fri, 15 Dec 2023 18:57:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3BFIvnFM049492 for bugs@FreeBSD.org; Fri, 15 Dec 2023 18:57:49 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 112379] [patch] [request] lockf(1): on closing stdin, stdout, stderr Date: Fri, 15 Dec 2023 18:57:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: kevans@freebsd.org X-Bugzilla-Flags: mfc-stable13? mfc-stable14? mfc-stable12- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D112379 --- Comment #6 from commit-hook@FreeBSD.org --- A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D159d922f4ce9405189b4f92bfe46858bf= de75400 commit 159d922f4ce9405189b4f92bfe46858bfde75400 Author: Alexander Melkov AuthorDate: 2023-11-22 04:46:28 +0000 Commit: Kyle Evans CommitDate: 2023-12-15 00:59:18 +0000 lockf: don't hold stdin/stdout/stderr open None of these are essential in the lockf monitor (parent post-fork), so close them to maintain the illusion that lockf hasn't been inserted into the pipeline. This ensures that the correct effects happen on other programs in the pipeline if the locked command closes or redirects these elsewhere. The original patch used -s to close stdout/stderr rather than closing them unconditionally, but it's not clear that we really care that much. kevans dropped that part when taking the patch, patch is otherwise by listed author. PR: 112379 Reviewed by: 0mp, allanjude (both earlier version), kevans Feedback from: des Sponsored by: Klara, Inc. (cherry picked from commit 18425c19cae08cbe41801845457ed67285806688) usr.bin/lockf/lockf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=