Timeline for How to wait in bash for several subprocesses to finish, and return exit code !=0 when any subprocess ends with code !=0?
Current License: CC BY-SA 4.0
Post Revisions
52 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S Apr 28, 2024 at 6:03 | history | suggested | Anees Rehman | CC BY-SA 4.0 | Fix words, fix syntex issues |
| Apr 27, 2024 at 5:13 | review | Suggested edits | |||
| S Apr 28, 2024 at 6:03 | |||||
| Jul 13, 2023 at 11:15 | comment | added | webmaster777 | For anyone thinking wait -n is a good idea: besides @drevicko's comment, wait -n DOES NOT return the return status of the process it has waited for. Bash's wait has a -p option for that, but using wait $PID is the most portable solution! | |
| Jan 15, 2023 at 17:24 | answer | added | pfrank | timeline score: 1 | |
| Nov 1, 2022 at 16:52 | history | protected | Ciro Santilli OurBigBook.com | ||
| Feb 16, 2022 at 5:49 | comment | added | Gabriel Staples | See also: Get exit code of a background process | |
| Jan 11, 2022 at 17:18 | answer | added | Gabriel Staples | timeline score: 15 | |
| Jan 11, 2022 at 16:20 | comment | added | Gabriel Staples | See also: Unix & Linux: Launch a background process and check when it ends | |
| Jan 11, 2022 at 16:19 | history | edited | Gabriel Staples | CC BY-SA 4.0 | fix minor formatting |
| Oct 31, 2021 at 11:05 | answer | added | Fonic | timeline score: 2 | |
| Jun 3, 2021 at 18:01 | answer | added | Mark | timeline score: 0 | |
| Apr 2, 2021 at 19:59 | comment | added | fbas | I saw this in a script, maybe it's the right thing. very concise. wait < <(jobs -p) | |
| Apr 22, 2020 at 18:23 | answer | added | Daniel C. Sobral | timeline score: 2 | |
| Jan 13, 2020 at 21:21 | comment | added | Erik Aronesty | @drevicko : wait -n solution here: stackoverflow.com/a/59723887/627042 | |
| Jan 13, 2020 at 20:44 | answer | added | Erik Aronesty | timeline score: 6 | |
| Sep 2, 2019 at 7:38 | answer | added | Ente | timeline score: 3 | |
| May 3, 2019 at 14:41 | answer | added | jplozier | timeline score: 18 | |
| Oct 2, 2018 at 12:45 | answer | added | vishnuitta | timeline score: 1 | |
| Aug 16, 2018 at 3:07 | answer | added | Mark | timeline score: 0 | |
| Aug 9, 2018 at 6:20 | answer | added | Anju Prasannan | timeline score: 2 | |
| Jun 27, 2018 at 9:23 | comment | added | drevicko | @CharlesDuffy wait -n has one small problem: if there are no child jobs remaining (aka race condition), it returns a non-zero exit status (fail) which can be indistinguishable from a failed child process. | |
| May 2, 2018 at 21:47 | history | edited | codeforester | CC BY-SA 4.0 | edited tags; edited title |
| Dec 15, 2017 at 0:56 | comment | added | Alexander Mills | if you are looking to test using Bash, try this: github.com/sstephenson/bats | |
| Dec 15, 2017 at 0:29 | comment | added | Charles Duffy | This could be significantly improved to touch on wait -n, available in modern bash to return only when the first/next command completes. | |
| Feb 13, 2017 at 10:41 | answer | added | Alexander Mills | timeline score: 3 | |
| Oct 28, 2016 at 17:14 | answer | added | user2138149 | timeline score: 3 | |
| Aug 3, 2016 at 23:36 | answer | added | Orsiris de Jong | timeline score: 9 | |
| Jun 24, 2016 at 16:18 | answer | added | Yajo | timeline score: 2 | |
| Mar 16, 2016 at 14:12 | answer | added | kenorb | timeline score: 131 | |
| Feb 24, 2016 at 21:35 | answer | added | Jason Slobotski | timeline score: 9 | |
| Aug 27, 2015 at 14:50 | answer | added | Paul Hodges | timeline score: 1 | |
| Jun 25, 2015 at 7:57 | answer | added | mug896 | timeline score: 1 | |
| Dec 3, 2014 at 13:01 | answer | added | Tosh | timeline score: 4 | |
| Oct 7, 2014 at 16:05 | answer | added | patapouf_ai | timeline score: 66 | |
| Feb 13, 2014 at 9:37 | answer | added | michaelt | timeline score: 7 | |
| Jan 10, 2014 at 1:17 | answer | added | Jayen | timeline score: 6 | |
| Nov 5, 2013 at 11:33 | answer | added | troelskn | timeline score: 3 | |
| Sep 26, 2013 at 9:45 | answer | added | Lloeki | timeline score: 1 | |
| Sep 6, 2013 at 21:01 | answer | added | stefanct | timeline score: 6 | |
| Jun 13, 2013 at 5:14 | answer | added | Brent Bradburn | timeline score: 23 | |
| S May 26, 2012 at 13:10 | history | suggested | mtk | Added a relevant tag. | |
| May 26, 2012 at 12:04 | review | Suggested edits | |||
| S May 26, 2012 at 13:10 | |||||
| Mar 20, 2012 at 11:42 | answer | added | estani | timeline score: 5 | |
| Feb 16, 2012 at 12:16 | answer | added | Ole Tange | timeline score: 54 | |
| Oct 3, 2011 at 19:51 | answer | added | errr | timeline score: 8 | |
| Jun 26, 2009 at 10:29 | answer | added | Mark Edgar | timeline score: 40 | |
| Feb 5, 2009 at 9:36 | answer | added | HoverHell | timeline score: 360 | |
| Jan 7, 2009 at 17:17 | vote | accept | tkokoszka | ||
| Dec 10, 2008 at 15:11 | answer | added | Nietzche-jou | timeline score: -1 | |
| Dec 10, 2008 at 14:28 | answer | added | Alnitak | timeline score: 8 | |
| Dec 10, 2008 at 14:07 | answer | added | Luca Tettamanti | timeline score: 760 | |
| Dec 10, 2008 at 13:54 | history | asked | tkokoszka | CC BY-SA 2.5 |