Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15284
| Path | csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Travis Everett <travis.a.everett@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | syntax errors produced by interaction between process substitution and a SIGCHLD trap |
| Date | Wed, 31 Jul 2019 13:35:52 -0500 |
| Lines | 42 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.373.1564598170.1985.bug-bash@gnu.org> (permalink) |
| References | <CAC=jSUVMXPSD=oOhi=9ha=4FeUBsbci3SOVPq0VQAFxWXVzBwQ@mail.gmail.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Trace | usenet.stanford.edu 1564598171 28818 209.51.188.17 (31 Jul 2019 18:36:11 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=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=w/Rnt7o1/t2YkHt6BLY5ZWhhYxLlJn9W0MB5FzCEQ+o=; b=YrXedvFhJwusp4vGz/K311fSXfgVRcP+sB1A+oKSF2GUgIso38P7aqn1pM4+2k2Y4L L/o90mVKq+ePk1+dcr0QumjdoDqgF0L5+RQQ8rSB85kkfIkO+9M4fYlaXO5zWvCL1KmU XsHXZMj8EL93uk8ufqkDlQOj/q3JO9CIGzefg28z/qo8te5L9g7udQaBc3iQhgI/PRce wQug+z9t141AYUBEJniJ/Jkw5z0UUERgtyyHLrYiUf58A2w6qMa17gNDIwwQIHudGvZ6 cBvOBXsBoPkT/LN3mCw/trHf0UAxYnew3a4yupfrY/oAQmirHAaihOqbMQPECOXxEuTC 4abg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=w/Rnt7o1/t2YkHt6BLY5ZWhhYxLlJn9W0MB5FzCEQ+o=; b=lxnbQs3J0xp4aetV7kCMroW1Qd4rnDcfqWCJjiRBqlMlx/D4/AWwHQ52vtcwt9Teqz bNCskTutgHnr33Ht7HceqPkKPThR7s/ltaaywhTdOB5LgYLWre3iwhL4XyocFQI3EDDs 6AfMkIU4SkMji5sQbSOI962CNdD71eWlaFzy24+HKSXyIiR4nN1zjdTI7SX38UnqNklH OYPt3aj0V+HsZvyt7S+ENltblI46u/F1sjrNrxkp2Qtd2Hptmkm7bm9cwCWLh0MACZIx tgfUKVnarDVB1qc+9eqbyU6VLvWJGSzYxXcai/5tHhCIOxCHnBvQtTShlJjI3IC1fBGY IhhA== |
| X-Gm-Message-State | APjAAAXB0BUrbe2sFrypBQo0i27TZoS1pYf/+v+IO1nbuHUAcCB93Jq2 P1CbmR4P1BitJR+Un/gJSk5AOGiWS/NVEsiHKzOCfHNS |
| X-Google-Smtp-Source | APXvYqzpABKSklC/tIwuSR4dQagm1FjjcOII/hU9umKsVkpf8rQMwfXxY9ZM7wP0PDGZ8OYOLPn8K98kHa79Vkk4f0w= |
| X-Received | by 2002:a67:fd88:: with SMTP id k8mr28954216vsq.41.1564598163677; Wed, 31 Jul 2019 11:36:03 -0700 (PDT) |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2607:f8b0:4864:20::e34 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.23 |
| 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 | <CAC=jSUVMXPSD=oOhi=9ha=4FeUBsbci3SOVPq0VQAFxWXVzBwQ@mail.gmail.com> |
| Xref | csiph.com gnu.bash.bug:15284 |
Show key headers only | View raw
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin17.7.0
Compiler: clang
Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security
uname output: Darwin 6841b968 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr
25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Machine Type: x86_64-apple-darwin17.7.0
Bash Version: 5.0
Patch Level: 7
Release Status: release
Description:
I stumbled into an odd interaction between process substitution and
a SIGCHLD trap that causes syntax errors in otherwise valid commands.
I managed to pare this down to a very minimal reproduction. I also
included a more realistic command at the end just in case I'm mistaken
about the minimal reproduction showing exactly the same issue.
I see the same behavior in bash 4.4.23(1)-release and do *not* see
it in the macos system bash 3.2.57(1)-release.
Repeat-By:
$ bash5 --norc --noprofile
bash-5.0$ trap '$()' SIGCHLD
bash-5.0$ $(:) $(:)
bash: command substitution: line 3: syntax error near unexpected
token `)'
bash: command substitution: line 3: `:)'
# Note that backticks don't cause the same trouble
bash-5.0$ `:` `:`
# in case there are multiple issues here
# I found it while composing a command like this (to expand a set
of globs, one per line, saved in file "exclude")
bash-5.0$ /usr/bin/env cat <(printf "%s\n" $(< exclude ));
bash: command substitution: line 6: syntax error near unexpected
token `)'
bash: command substitution: line 6: `< exclude ));'
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
syntax errors produced by interaction between process substitution and a SIGCHLD trap Travis Everett <travis.a.everett@gmail.com> - 2019-07-31 13:35 -0500
csiph-web