Re: Discussion on wait

2025-01-30 Thread Oğuz
On Thu, Jan 30, 2025 at 8:27 PM Muhammed Mahmood wrote: > I'm curious as to why you think that it's not worth it for this functionality > to be in an option. Fewer options to remember the better. > Actually, upon closer inspection, the line of code you shared still seems a > bit incomplete. Y

Re: Discussion on wait

2025-01-30 Thread Robert Elz
Date:Thu, 30 Jan 2025 11:00:36 -0600 From:MacBeth Message-ID: | errwait() { while wait -n || return; do :; done; } Yes, that would also be good (could have the -p added as well if desired). kre

Re: Discussion on wait

2025-01-30 Thread MacBeth
On Thu, Jan 30, 2025 at 2:02 AM Robert Elz wrote: > Date:Thu, 30 Jan 2025 06:03:18 +0300 > From:=?UTF-8?B?T8SfdXo=?= > Message-ID: m3wdtjk0dfztgmfoggt2du...@mail.gmail.com> > > I'd suggest putting it in a function, something like > > wait_for_error() { >

Re: Discussion on wait

2025-01-30 Thread Robert Elz
Date:Thu, 30 Jan 2025 06:03:18 +0300 From:=?UTF-8?B?T8SfdXo=?= Message-ID: | `while wait -n; do :; done' already does that Not quite, after that loop $? = 0 (always) so there's no way to tell whether or not one of the commands failed, which I suspect was the orig

Re: Discussion on wait

2025-01-29 Thread Oğuz
On Wednesday, January 29, 2025, Muhammed Mahmood via Bug reports for the GNU Bourne Again SHell wrote: > > Ideally, there should be a wait -e which waits for every child process but > exits on the first non zero exit code received. > `while wait -n; do :; done' already does that -- Oğuz