Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15617
| From | Oğuz <oguzismailuysal@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: bash loses control of jobs inside a command substitution |
| Date | 2019-11-20 15:18 +0300 |
| Message-ID | <mailman.2082.1574252331.13325.bug-bash@gnu.org> (permalink) |
| References | <CAH7i3LqejwmNBPLOXHaesjXi9PA=+oU2jGxL7CGOE8cbEJyxzg@mail.gmail.com> <CAH7i3LpK_4NTF1z_Dy=6yy19NW9=RGZBbTwOV-G_DMqxJu77rA@mail.gmail.com> |
Behavior of wait -n differs on interactive and non-interactive sessions
though, maybe this really is a bug
$ bash -ic '( ( sleep 0.1; exit 13 ) & sleep 0; wait -n; echo $? )'
0
$ bash -c '( ( sleep 0.1; exit 13 ) & sleep 0; wait -n; echo $? )'
13
On Wed, Nov 20, 2019 at 1:01 PM Oğuz <oguzismailuysal@gmail.com> wrote:
> This seems more like a race condition, see:
>
> $ f() { ( sleep 0.1; exit 13 ) & "$@"; wait -n; echo $?; }
> $
> $ f sleep 0.0
> [1] 30612
> [1]+ Exit 13 ( sleep 0.1; exit 13 )
> 13
> $ f sleep 0.2
> [1] 30617
> [1]+ Exit 13 ( sleep 0.1; exit 13 )
> 127
>
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: bash loses control of jobs inside a command substitution Oğuz <oguzismailuysal@gmail.com> - 2019-11-20 15:18 +0300
csiph-web