Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15065
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | "" <kfm@plushkava.net> |
| Newsgroups | gnu.bash.bug |
| Subject | File descriptor of process substitution unexpectedly persisting |
| Date | Fri, 21 Jun 2019 19:58:22 +0100 |
| Lines | 37 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.609.1561150004.10840.bug-bash@gnu.org> (permalink) |
| References | <20190621195822.be84baf077ebe5dfda8b72ae@plushkava.net> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1561150005 14788 209.51.188.17 (21 Jun 2019 20:46:45 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=plushkava.net; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=fm3; bh=wOS/N0W+3bnSjR2VvLHHX4JLg3 3J3UQHoL5ufoZjLSc=; b=Dxwq8AoHWYfYogNBlz5CdVRRf3WA9aMNFQD0y8XZWj q5Xy2GJZHYtCsC9FUY55iXF1sWnesLrik+DGwVPx/Rb0IzNwih/igsK/K1pwJvFC DmSrAL7ZQq72bX3cL/XeikzPnhK/aFbcCzGkLXlIeMIjZxSSbd8hO9TkCp3fEIrk svZG1Wqy4OQStcAdv1pcE/nkbOdtmgV8R8glTRDnOGXLS/WhZILeH98v0QpSOrzc UKc98vB0zVCNBIGSJZ4ZWqnknS1PkImes48v9AHCTsRU7nXdImQ47oOmX9LUTEpJ IFrEJVfPWmzkuVvQsFig3YUDfL4bD3ou8Blfy3MRee7g== |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=wOS/N0 W+3bnSjR2VvLHHX4JLg33J3UQHoL5ufoZjLSc=; b=OqO7o6VBvhXJWXndSSjpnT oQVMTgKG576jebEWsiG7+CSDd4PR2/kaz9LoDlAFVl7Oj7JddgGCwCYBR75kNGV8 Rasr44YDJssU3rug8wfIFVowsXJS0ebSr8Sp+YU70lra/NK5vTqizmtQz+YuIe+f yF5eA4jPtTBaCwt24i3keDRKB8aH8jnQROEn0/P5NYMiRbju4MatSv6NrulQHhPE UyrVepm9e5nyMyzM5Ak7QOl8QBNnrIim040TuFGZLEBZKmr+vWc1ifaOoYzYhaIj 6662zajkqKIVM18DTr2+P7Vc4v/Rm1okKT33kuNETzQQgxmnvuVssb9mJ5ihOEuw == |
| X-ME-Sender | <xms:1CgNXc-MhDXY8xMR2I0y5eQ4cOeQiQfc4cEoD38Sd70e-v0Xkd1yLg> |
| X-ME-Proxy-Cause | gggruggvucftvghtrhhoucdtuddrgeduvddrtdeigddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgogfhmphhthietlhhirghsucdlfeelmdenucfjug hrpeffhffvuffkofggtgfgsehtjeertdfjtddvnecuhfhrohhmpedffdcuoehkfhhmsehp lhhushhhkhgrvhgrrdhnvghtqeenucfkphepudelfedrudefkedrvddukedrudeltdenuc frrghrrghmpehmrghilhhfrhhomhepkhhfmhesphhluhhshhhkrghvrgdrnhgvthenucev lhhushhtvghrufhiiigvpedt |
| X-ME-Proxy | <xmx:1CgNXSo2_4bam21CwPq2KLs95S1cNpGnOFYLq9BGi5jS6Hl36_VaKg> <xmx:1CgNXUUNfRftmV2xdQa4np9hhO9S1_YHkZsS7q00cAlyzdMLrFhnUA> <xmx:1CgNXRD_ibRx-YPLtt4fR6ZQf3N0cr455AM1DNY7FoREuptsOI7MFQ> <xmx:1CgNXS5buFWbN0qT1tG8BrREqdUVJ238FZlUI62ddXVXJXc7Bvi_kw> |
| X-Mailer | Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] |
| X-Received-From | 64.147.123.24 |
| X-Mailman-Approved-At | Fri, 21 Jun 2019 16:46:39 -0400 |
| 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 | <20190621195822.be84baf077ebe5dfda8b72ae@plushkava.net> |
| Xref | csiph.com gnu.bash.bug:15065 |
Show key headers only | View raw
Hi,
As tested interactively with bash 5.0.7(1) and GNU/Linux, the following command prints a constant number of active file descriptors, as expected:
$ while :; do { read; } < <(:); sleep 0.5; printf %s\\n /proc/self/fd/* | wc -l; done
6
6
6
6
6
... etc
However, merely by assigning a variable prior to the loop, though within the same line, the number will continuously grow:
$ var=0; while :; do { read; } < <(:); sleep 0.5; printf %s\\n /proc/self/fd/* | wc -l; done
6
7
8
9
10
... etc
If then adjusted so that the read command is not part of a compound command, normality is restored:
$ var=0; while :; do read < <(:); sleep 0.5; printf %s\\n /proc/self/fd/* | wc -l; done
5
5
5
5
5
... etc
I noticed this behaviour upon running out of file descriptors after executing structurally similar code that deliberately utilises a compound command to read twice, thus discarding the first line of input.
--
Kerin Millar <kfm@plushkava.net>
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
File descriptor of process substitution unexpectedly persisting "" <kfm@plushkava.net> - 2019-06-21 19:58 +0100
csiph-web