Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16520

Re: ‘command … &’ creates subshell

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: ‘command … &’ creates subshell
Date Wed, 1 Jul 2020 14:19:28 -0400
Lines 81
Approved bug-bash@gnu.org
Message-ID <mailman.788.1593627586.2574.bug-bash@gnu.org> (permalink)
References <k0znfddo.dag@gnui.org> <511886e8-2262-39ee-2a01-7d284e981cb1@archlinux.org> <tuysgrgt.dag@gnui.org> <pn9hipci.dag@gnui.org> <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu> <7dvoi92p.dag@gnui.org> <09ea84b2-4fb1-6b05-7c0b-fe6b2ab00c6f@archlinux.org> <2643.1593599092@jinx.noi.kre.to> <24624.1593615917@jinx.noi.kre.to> <29344.1593626485@jinx.noi.kre.to> <bb02aa3f-7c52-22c1-2d5e-e6e47b4abaff@archlinux.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="H4TRqjdgedvGsFSO68C2RhdWtr5DuAcsM"
X-Trace usenet.stanford.edu 1593627586 11948 209.51.188.17 (1 Jul 2020 18:19:46 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org
To Robert Elz <kre@munnari.OZ.AU>, Dmitry Alexandrov <dag@gnui.org>
Envelope-to bug-bash@gnu.org
X-Spam-BL-Results
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1593627574; bh=laS56Dp6FeJ1SMxTeM5+dMcVdGJAj91fx/fuGz1/3Pc=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=OqOXlGhWPy+HBwSHLQz5/P8N48/W80PeebIs+cMDjR4nB6VZV59QliwksBRVYiF8a Bhq3orFeaG/hDRUnw3Bv5rHSHT4vdz7PZP+z0cmMw7QsnwMs+28h9R6PTJAxGDl4/r fu690XwTE7EPE4FIGCfeqDQueQjWJFmYtMJSb17McmklsqDSlS6gyFWsrIOFpGhmNV pjZKnx0P1AUxkPtkx61l6kcFnAfWMLCcAGQIyJVgFsTv7Xjv7KOrPKt10yi4GRASTx U8opmxFNLt25i8WtKHX+xZVJuNnuSPALtFvkcGrpfUlrSqFfqq4ZzKxQw5U0oz9SDw Bz+4fYW7mlFtKMN6Z77yD6lykD5QXBtsY67EJkOB4vQ9VEaSpZj6u/bnLtALJBBysb vSBxme8SdiRb2CuEW2ujel/NIjKkNixHwOOds8gdGIuPvQPx5EjBnlIvQ6pZU5uv+R 3EIvJOBndYAaTQu+eWguE564JH3PHVdk28o/p3QMlPuhkYmr+N0yPeo0xRhLRHth7q cpy+TorsOF4ZWodplQ/OKsxtZZOZVdWMPUmsNJEnGYNySnsOCSHiS9gqh3OzY28DOM Vo1MOD4JpWmxJ1//SnpIh/4bT+Uuh8EMI4x7qLkE+gm+T1NKKnJa8RN/zoDAklCwTo R6DNjaR0+WeRAaxB7MWdOaXU=
X-Clacks-Overhead GNU Terry Pratchett
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0
In-Reply-To <29344.1593626485@jinx.noi.kre.to>
Received-SPF pass client-ip=88.198.91.70; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org
X-detected-operating-system by eggs.gnu.org: First seen = 2020/07/01 14:19:40
X-ACL-Warn Detected OS = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int -53
X-Spam_score -5.4
X-Spam_bar -----
X-Spam_report (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <bb02aa3f-7c52-22c1-2d5e-e6e47b4abaff@archlinux.org>
X-Mailman-Original-References <k0znfddo.dag@gnui.org> <511886e8-2262-39ee-2a01-7d284e981cb1@archlinux.org> <tuysgrgt.dag@gnui.org> <pn9hipci.dag@gnui.org> <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu> <7dvoi92p.dag@gnui.org> <09ea84b2-4fb1-6b05-7c0b-fe6b2ab00c6f@archlinux.org> <2643.1593599092@jinx.noi.kre.to> <24624.1593615917@jinx.noi.kre.to> <29344.1593626485@jinx.noi.kre.to>
Xref csiph.com gnu.bash.bug:16520

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 7/1/20 2:01 PM, Robert Elz wrote:
> The lack of an easy method to force execution of a command from the
> filesystem is very likely because there is generally no reason to do
> that.   That is, no-one ever really wanted it, so no method was invented.
> 
> However, for whatever reason, people keep asking how.  Either by directly
> asking the question, or by picking one of the popular (but incorrect)
> methods, and either claiming it works, or complaining when it doesn't.
> 
> As best I can tell, other than doing a search of PATH, and then using the
> full path name (which is what $(type -P cmd) does in bash, more succinctly
> than shells that don't have this -P option to type), [...]

One reason might be because the busybox applets for programs which are
*normally* external disk utilities, can be lacking in functionality,
often by a lot. In some cases, *hilariously* so (look at busybox ps,
it's basically a long list of FIXMEs for POSIX requirements).

I will confess however that I usually solve this by not considering
busybox to be a suitable /bin/sh.

The more general solution, possibly, would be e.g. invoking gawk, not
awk, if you know you need extended functionality. awk might be a builtin
(is, with busybox), but gawk probably isn't!

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: ‘command … &’ creates subshell Eli Schwartz <eschwartz@archlinux.org> - 2020-07-01 14:19 -0400

csiph-web