From nobody Wed Nov 13 14:38:36 2024 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 4XpQrX4lJmz5dgtT for ; Wed, 13 Nov 2024 14:38:36 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpQrX3Kg3z4qQ8 for ; Wed, 13 Nov 2024 14:38:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731508716; 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=lc5C78f/u95J8GC9iRtHqZuPMZEsewjFlkIszlScW6A=; b=xYlpKIUaydI+O4lU4sEAn0RuTuz7GqJB1Sk4jq5KabsrXJMwIoMOAjZoKSVDWncgTwauoj Oq6gziZcNCjJYZ7jQiFIiEgvdl9qT8EHcfO+DR0fr6jc5xMNfx8ueleP2f38eSYUknTApT +y8JpLuO9wf9S1CxwA9lw5Lb1b87u2C7yaesVxhsm6rYd/osRZdbq1Xi1CIl1fkmsfYVNn wYDyeroQ3sNhCuDhONu3Xx4WBjCOY2t1PTElz1uUcpU1ElnIw+KvIC9GpFdTLveJvWOfaO aaFUaN6Ev++DRNgFtMz+ugx7CngIkuEVrfAXWGw17VMlGmtC2OSMf3QuYayO2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731508716; a=rsa-sha256; cv=none; b=vHiB2OkY+yNKObYrZoj/R7iyly30m+4kSNhOot8SBZay1PlTcS27E8W1vRbx6VLSfZOcqm 4akjJumNHiwycUEdJCtXccv5RQQ4jBx/PWjpz+Evh508nxSj4WTRX93ml3HSaJepTsm2YP w93royF0QgC1vE4PWgN0pyN26Wx6GIjX2K9GshFHmJuQXb4xmY6E0gLEEyImZrGe8A2ku+ pQDiuBcncUSryAH/lRLW7G5UUShs4o6MchUFdYo6UEzgXEY1RATPJUZnQwWWyDJZ3EpKjq Ma0Od/GF9y4iX2uMK4yO69fc8tXRv6ip676Q5/fLQAjftBBHQqmWz4jysg9SvQ== 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 4XpQrX2pm2zyVB for ; Wed, 13 Nov 2024 14:38:36 +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 4ADEcaQA002256 for ; Wed, 13 Nov 2024 14:38:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4ADEcaVA002255 for bugs@FreeBSD.org; Wed, 13 Nov 2024 14:38:36 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 282714] /bin/sh doesn't report line numbers correctly when run with the PS4 environment variable Date: Wed, 13 Nov 2024 14:38:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D282714 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emaste@freebsd.org --- Comment #1 from Ed Maste --- There's a reference to LINENO in PS4 in: commit 292e6676632a8c0ec58ba6a005d2478aa57e799d Author: Jilles Tjoelker Date: Thu Jun 9 23:12:23 2011 +0000 sh: Do parameter expansion before printing PS4 (set -x). The function name expandstr() and the general idea of doing this kind of expansion by treating the text as a here document without end marker is from dash. All variants of parameter expansion and arithmetic expansion also work = (the latter is not required by POSIX but it does not take extra code and many other shells also allow it). Command substitution is prevented because I think it causes too much co= de to be re-entered (for example creating an unbounded recursion of trace lin= es). Unfortunately, our LINENO is somewhat crude, otherwise PS4=3D'$LINENO+ ' would be quite useful. --=20 You are receiving this mail because: You are the assignee for the bug.=