Re: "wait" loses signals

2020-02-21 Thread Denys Vlasenko
On 2/21/20 4:07 PM, Chet Ramey wrote: On 2/21/20 9:44 AM, Denys Vlasenko wrote: Yes, and here we are "after command", specifically after "{...} &" command. Since we got a trapped signal, we must run its trap. Did you look at the scenario in my message? What scenario? The scenario in

Re: "wait" loses signals

2020-02-21 Thread Chet Ramey
On 2/21/20 9:44 AM, Denys Vlasenko wrote: >>> Yes, and here we are "after command", specifically after "{...} &" command. >>> Since we got a trapped signal, we must run its trap. >> >> Did you look at the scenario in my message? > > What scenario? The scenario in the message you replied to. >

Re: "wait" loses signals

2020-02-21 Thread Denys Vlasenko
On 2/20/20 4:27 PM, Chet Ramey wrote: On 2/20/20 3:02 AM, Denys Vlasenko wrote: On 2/19/20 9:30 PM, Chet Ramey wrote: On 2/19/20 5:29 AM, Denys Vlasenko wrote: A bug report from Harald van Dijk: test2.sh: trap 'kill $!; exit' TERM { kill $$; exec sleep 9; } & wait $! The above script ought

Re: ${!variable@operator} does not work for variables without values; inconsistencies between present and absent [@] for @A and @a

2020-02-21 Thread Chet Ramey
On 2/20/20 6:54 PM, Arfrever Frehtes Taifersar Arahesis wrote: > Chet Ramey 2020-02-20 21:22 UTC: >> On 2/19/20 7:46 PM, Arfrever Frehtes Taifersar Arahesis wrote: >>> But I am not interested in any ${!varname[@]}, but instead in applying >>> @operator transformations. >> >> OK, let's see how

Re: ${!variable@operator} does not work for variables without values; inconsistencies between present and absent [@] for @A and @a

2020-02-21 Thread Chet Ramey
On 2/20/20 6:23 PM, Arfrever Frehtes Taifersar Arahesis wrote: > Even more strangely, quoting apparently matters... Yes, this is a bug: > $ echo "${VAR1[@]@A}" > declare -rl VAR1='' >> The question is whether the unset variables should display commands to >> set the attributes (@A) or display

Re: test -v for array does not work as documented

2020-02-21 Thread pepa65
On 21/02/2020 02.37, Chet Ramey wrote: > It's unset because it doesn't have a value, but it retains the `local' > attribute so it stays local if subsequently assigned one. Is there any reason the local attribute cannot be unset? If it would be possible then the "declare/typeset -p" would return 1