Re: wait inside subshell waits for sibling

2022-10-27 Thread Chet Ramey
On 10/24/22 4:52 AM, Emanuele Torre wrote: On 24/10/2022, Robert Elz wrote: There's no reason that wait (the command) cannot check for candidate jobs which are still running, and wait for any of those, and then return as soon as there are none left. That the shell happens to have forked

Function declarations produce no trace nor trigger debug trap while having side effects

2022-10-27 Thread Erik Adelbert
Configuration Information [Automatically generated, do not change]: Machine: aarch64 OS: darwin21.6.0 Compiler: clang Compilation CFLAGS: -DSSH_SOURCE_BASHRC uname output: Darwin rio 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101

Re: wait inside subshell waits for sibling

2022-10-27 Thread Chet Ramey
On 10/23/22 10:25 PM, Emanuele Torre wrote: I don't think the process running `cat' is a sibling of the subshell. It's not, but in this case it doesn't matter. `wait' without arguments should wait for the last process substitution only if it's the same as $!. You can wait for other process

Re: wait inside subshell waits for sibling

2022-10-27 Thread Oğuz
27 Ekim 2022 Perşembe tarihinde Chet Ramey yazdı: > > Yep, this is a problem. I'll have a fix in the next devel branch push. > Thanks -- Oğuz

Re: Function declarations produce no trace nor trigger debug trap while having side effects

2022-10-27 Thread Chet Ramey
On 10/27/22 11:33 AM, Erik Adelbert wrote: Bash Version: 5.2 Patch Level: 2 Release Status: release Description: We have found that [https://www.gnu.org/software/bash/manual/bash.html#Shell-Functions shell function] _declarations_: 0 do not emit trace output 0 do not call DEBUG trap 0 modify

Re: wait inside subshell waits for sibling

2022-10-27 Thread Chet Ramey
On 10/23/22 3:47 AM, Oğuz İsmail Uysal wrote: To reproduce:    $ echo $BASH_VERSION    5.2.2(3)-release    $ ( : & wait ) > >(cat)    *hangs* It should return immediately, but hangs instead. Yep, this is a problem. I'll have a fix in the next devel branch push. -- ``The lyf so short,

Re: Function declarations produce no trace nor trigger debug trap while having side effects

2022-10-27 Thread Oğuz
27 Ekim 2022 Perşembe tarihinde Erik Adelbert yazdı: > Unless we have missed the related documentation, > You have. > trap [-lp] [[arg] sigspec ...] > [...] If a sigspec is DEBUG, the command > arg is executed before every simple command, for > command, case command, select command, every