Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16076
| From | Oğuz <oguzismailuysal@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | commands following asynchronous list are executed twice |
| Date | 2020-04-02 15:09 +0300 |
| Message-ID | <mailman.15.1585829370.2644.bug-bash@gnu.org> (permalink) |
| References | <CAH7i3LqCeSt-v=pYBVMXPNC3Ycs3sVMugTxP2mxx-v2MW=RCig@mail.gmail.com> |
While reading commands from stdin, if job controls are enabled,
commands following an asynchronous list in `{ cmd; } &` fashion are
executed twice. See below extract:
$ bash -m <<\EOD
{ sleep 1; } &
wait
echo $BASHPID
EOD
10615
10615
When job controls are disabled, or an external utility is called in
the same line this behavior disappears. E.g.:
$ bash -m <<\EOD
{ sleep 1; } & x
wait
echo $BASHPID
EOD
./bash: line 1: x: command not found
10618
This is reproducible on 4.4.20(1)-release, 5.0.11(1)-release and 5.0.16(1)-maint
--
Oğuz
Back to gnu.bash.bug | Previous | Next | Find similar
commands following asynchronous list are executed twice Oğuz <oguzismailuysal@gmail.com> - 2020-04-02 15:09 +0300
csiph-web