From nobody Sat Mar 8 16:13:41 2025 X-Original-To: dev-commits-src-main@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 4Z97W94036z5pQ1l; Sat, 08 Mar 2025 16:13:41 +0000 (UTC) (envelope-from git@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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z97W93Hfsz3bHL; Sat, 08 Mar 2025 16:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1741450421; 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=PZYfD2ZNhCgstJH+MkYww5TX3PhSTk4JIUTlawdug4k=; b=fLOm5LVqGdG0QXp+tgP0zZEaMs1c4AQzAJe53Hi/ZV/aq8XM53LIOloXax9fG1RcF3uAaR VmHbDFZRjUDUmglLt1DmaMLv6NtGta/MldQrf+tsmS9BnnhRc1ntq2Ob/SfX9GmZgLfASO uNDQ9zaz4ic4a8xgTv5TGVLSWuMRq/1rz+c90xoMjqxXSlg+NtxfVwMy9T2gq7BNO6zNjU U8hhPcEIylkTXbwwTogsTw47iEJJ/l6srWiDUC9F4rlZ+0ZiEd1CRRJuD2YN5VUTLD6NE5 j/wz6Zm2tAgaeR0uUBQUDiluD+llVeEQgFnGpNntrBc0sI0GD1jr8M6I4SoakQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1741450421; a=rsa-sha256; cv=none; b=ZAxYjdKNPsou28XOLUZoDoNzlAaths3APzKRScJVgitz2Uahbk6lfMNIZ+IF3n2e1oVvVd C4P0bxlwmtW9RR8eVV1TggYhEEfEuqjTEL3rce5f/0MbEuTPmIIaGul45iYt3y2tXMbT44 YjwOGdRuBTEaLAES6TZkgpVS9esdoJp9qehrwGVq9pwm1FDskkOwspX1uxH9XEbjUo886z 3s3VcEG821aEZp0E2CsLy02J2tryoJ2payjPS1bqr1t90AE5+XYeji7s/U44nt1UKgKbaC CczbF4Ok7QaHAVll+iVsEfjWhmKKKQ94g4Z0jeKkOUOoJVI0Idtyz7V2oT9EFA== 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=1741450421; 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=PZYfD2ZNhCgstJH+MkYww5TX3PhSTk4JIUTlawdug4k=; b=Z2dqlagCdynSMfvkuN5ab0TjgM702LZLugZw27USgJ0TIRP+9YbW9vt+k4RnljlHJtWdtT DvlYTn/hdUA9KFbBqSYcGPdojB8sjEmsn8GKy1lq9Mb2aKT87INbYIwJfY392ITVQdWVm/ j5tDYfd29Xob0CtFqRBt/Ec4/gHaXomzfykTXc0eIrRlNaq75t9HRGM7zGVdsI61E7m9nU JwJKQGuLxDxSyOP0YLuYGcymoVRc5YNDPGgKs5hR/bVU9BbkeSG29A5SCUu9c+UNQ8pXiE 5rKXSJAQxZfYpQzlq/WxPZcAVS9RNcq6ZIADtwrGSo7xEbUIZLSDsPboPcEpTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Z97W92t5XzVfL; Sat, 08 Mar 2025 16:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 528GDfYX096824; Sat, 8 Mar 2025 16:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 528GDffo096820; Sat, 8 Mar 2025 16:13:41 GMT (envelope-from git) Date: Sat, 8 Mar 2025 16:13:41 GMT Message-Id: <202503081613.528GDffo096820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 7bd8da72c581 - main - sh(1): Replace recommendation of use of -e with a note List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bd8da72c5814b486ae7f492286fe3ac0a5bf03d Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=7bd8da72c5814b486ae7f492286fe3ac0a5bf03d commit 7bd8da72c5814b486ae7f492286fe3ac0a5bf03d Author: Michael Osipov AuthorDate: 2024-05-03 07:57:06 +0000 Commit: Michael Osipov CommitDate: 2025-03-08 16:13:25 +0000 sh(1): Replace recommendation of use of -e with a note This partially reverts b14cfdf665bb8b7b2898a4ee5b073ab87f8ea3d0 and has been discussed in D42719. Reviewed by: jrm (mentor), otis (mentor), mandree, ziaee (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45073 --- bin/sh/sh.1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 768193905c49..5458f5f6f37c 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 27, 2025 +.Dd March 8, 2025 .Dt SH 1 .Os .Sh NAME @@ -238,11 +238,9 @@ If a shell function is executed and its exit status is explicitly tested, all commands of the function are considered to be tested as well. .Pp -It is recommended to check for failures explicitly -instead of relying on -.Fl e -because it tends to behave in unexpected ways, -particularly in larger scripts. +Note that many commands return non-zero values to convey information other +than errors, which can cause unexpected program termination with +.Fl e . .It Fl f Li noglob Disable pathname expansion. .It Fl h Li trackall