Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16476
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eli Schwartz <eschwartz@archlinux.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Undocumented feature: Unnamed fifo '<(:)' |
| Date | Sun, 28 Jun 2020 17:27:47 -0400 |
| Lines | 81 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.596.1593379681.2574.bug-bash@gnu.org> (permalink) |
| References | <d1172623-25cb-bcf9-b9b5-b7bf3cb547f7@archlinux.org> <20200628134945.GB24863@medium.hauri> <CANaoh6KSJS8X73Zqj7M8TT6_gAOjGraZx1EaEVwUNN_=Yya3wQ@mail.gmail.com> <6427.1593375682@jinx.noi.kre.to> <346bda2f-83dc-afda-d911-9688daefb10e@archlinux.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IPHdgFMsqET4FvQKOzFPbwAaPWok4Q044" |
| X-Trace | usenet.stanford.edu 1593379681 6683 209.51.188.17 (28 Jun 2020 21:28:01 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | Robert Elz <kre@munnari.OZ.AU> |
| 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=1593379672; bh=EmCUszB8pgJU3UqEJQL0FQ0tkduxtkFS7vsaDlg7HAo=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=x2BL2umXgLhpopqask9opBNwYZYi+427c/IFOAYX2YgmpbgMvZHZyaOxLKZn/02oz k/oiYSxZNTrzdKbpfP1xmhNVqK2vs3LqQVMZQmWY0+CoMfhILzApgSlEP3yi1p4V9u 4rsJCShdNNOzsYVbtHdunWoxMwBZPStWuDwMud/DCKMcTlzOXOVb1DgJbgyiRdRdlc CMRfqQNx8giQuLQt2xr+igiBDwi8AEUv7X5rKtlgIMzTu8eDtXZJGnsef/L11rGp9e PF5h+LsZ8zBml51cEegz5pa4XC6HYWMw73Hk2YkQVPAJ6nVrz8tkcIRjq/6Zt/htft sWIK39Ec1dhQG4qr9Qk69chQgj7NU/MQ1DYShP5rZhBH0/oljpiCOW7wH5CwY6Sdmw jxs0EQvb4YB0868yBmNHkC6EAKXtF0+chIMJkowOYrR8RSA6McFPwyWRFoPxFqiovv 4L0UkryrSOOqKotPkArv1B5vYY4a9KTTbj2ejJyk6Jj+acI3XUMpiXkj/baQl+QTjA tUIDskjWsNyeXqk7orP/5aFTHckrEqCZmGvml5Crk/GOMfE9EXcQr1SWPJqDwTwSrz VD5JcjWT+Vn19kgwzQPS4PJ6Y20YS4kEuwO1Hl3SZN7cn2i+k8fBbntPudBlvfjeH6 ICNiZNnMnxaqEOZSds6Xzx8E= |
| 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 | <6427.1593375682@jinx.noi.kre.to> |
| Received-SPF | pass client-ip=2a01:4f8:160:6087::1; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org |
| X-detected-operating-system | by eggs.gnu.org: No matching host in p0f cache. That's all we know. |
| 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, 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 | <346bda2f-83dc-afda-d911-9688daefb10e@archlinux.org> |
| X-Mailman-Original-References | <d1172623-25cb-bcf9-b9b5-b7bf3cb547f7@archlinux.org> <20200628134945.GB24863@medium.hauri> <CANaoh6KSJS8X73Zqj7M8TT6_gAOjGraZx1EaEVwUNN_=Yya3wQ@mail.gmail.com> <6427.1593375682@jinx.noi.kre.to> |
| Xref | csiph.com gnu.bash.bug:16476 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 6/28/20 4:21 PM, Robert Elz wrote: > I noticed that explanation, but like Dennis, I fail to see how the > complicated version does any more than pretend there are less forks > happening. Was the speed of this actually measured, and if so, where > are the comparative results? Sure, and that can be pointed out, but that's a long way away from what Dennis actually said, which is "why not just use a function", implying that the use or not of a function is relevant here. > Either way, to make the conversion, the date command needs to be run > (in the complicated version, setbuf as well, which means an extra exec > at least) - running a command means a fork, and all we have to start > with is bash, so bash needs to fork to run date, each time it needs > to run. > > What evidence is there that the complicated way, with all of its extra > file opens, etc, is faster than the simple way, or involves less forks? IIRC bash will (if it can) optimize out $(cmd) to fork+exec cmd, rather than fork bash, then fork+exec cmd. Perhaps the OP is assuming that the fifo dance will result in one fork, rather than two? Pointing out this flawed assumption is a useful data point, saying "why not just use a function" is not. (In fact, I'd assume the $(function) is actively a bad idea as it would prevent bash from optimizing out the $(/usr/bin/date) fork.) -- Eli Schwartz Arch Linux Bug Wrangler and Trusted User
Back to gnu.bash.bug | Previous | Next | Find similar
Re: Undocumented feature: Unnamed fifo '<(:)' Eli Schwartz <eschwartz@archlinux.org> - 2020-06-28 17:27 -0400
csiph-web