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


Groups > gnu.bash.bug > #16520

Re: ‘command … &’ creates subshell

From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: ‘command … &’ creates subshell
Date 2020-07-01 14:19 -0400
Message-ID <mailman.788.1593627586.2574.bug-bash@gnu.org> (permalink)
References (6 earlier) <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>

Show all headers | 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