Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16714
| From | "" <kfm@plushkava.net> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: process substitution error handling |
| Date | 2020-08-06 15:26 +0100 |
| Message-ID | <mailman.1012.1596723981.2739.bug-bash@gnu.org> (permalink) |
| References | (2 earlier) <CAHmME9pzOY_0EJ69y9wt6r-Jh3frZpV8XdFC6zG5EOkZ99h-1A@mail.gmail.com> <e0a56db4-6444-5dde-3fdc-e3237e669cc6@archlinux.org> <8a54cb1e-af78-f79f-6d73-6a235d707207@plushkava.net> <b8fb1f5b-f8e4-b618-9c4e-7ccfa525f1f8@archlinux.org> <198e939d-5220-b23c-6c99-b2858bc94420@plushkava.net> |
On 06/08/2020 14:57, Eli Schwartz wrote: > On 8/6/20 9:15 AM, kfm@plushkava.net wrote: >> You beat me to it. I was just about to suggest wait $! || exit. Indeed, >> I mentioned the same in a recent bug report against wireguard-tools. > > So if I understand correctly, you reported the lack of wait $! || exit > in a script, and the script author instead responded by requesting a new > feature in bash that does the same thing, except after a random interval > during another command's execution? Well, I wouldn't presume to know whether there is any relationship between said report and the feature request under discussion. Briefly, the errexit pitfall that affected me can be seen here: https://github.com/WireGuard/wireguard-tools/blob/v1.0.20200513/src/wg-quick/darwin.bash#L299 I happened to mention that the exit status value of networksetup(8) is never checked and that it ought to be, with wait $! being one way of doing so. That being said, the proposed solution eschewed the use of process substitution altogether. > >> I concur. The scripts I looked at tended heavily towards error handling >> at a distance and were already subject to one or two amusing errexit >> pitfalls. > > lol, I bet we could fix that by adding even more error handling at a > distance. > -- Kerin Millar
Back to gnu.bash.bug | Previous | Next | Find similar
Re: process substitution error handling "" <kfm@plushkava.net> - 2020-08-06 15:26 +0100
csiph-web