Re: wait -n shouldn't collect multiple processes

2019-03-26 Thread Andreas Schwab
On Mär 26 2019, Ben Elliston wrote: > On Mon, Mar 25, 2019 at 04:53:02PM -0400, Chet Ramey wrote: > >> "wait waits for any job to terminate and returns its exit status" >> >> Doesn't that imply a single job? > > Not as clearly as saying "wait waits for a single job to terminate" Even better,

Re: wait -n shouldn't collect multiple processes

2019-03-26 Thread Robert Elz
Date:Tue, 26 Mar 2019 10:55:53 +0100 From:Andreas Schwab Message-ID: | Even better, IMHO: "wait waits for the next job to terminate" Something should allow for there being no waiting involved at all if some job has already terminated but has not been waited for.

Re: wait -n shouldn't collect multiple processes

2019-03-26 Thread Chet Ramey
On 3/26/19 8:12 AM, Robert Elz wrote: > Date:Tue, 26 Mar 2019 10:55:53 +0100 > From:Andreas Schwab > Message-ID: > > | Even better, IMHO: "wait waits for the next job to terminate" > > Something should allow for there being no waiting involved at all > if some job

Re: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Chet Ramey
On 3/25/19 3:48 PM, Konstantin Andreev wrote: > Consider the simple `ssxtrap' script: > > | #!/bin/bash > | > | echo  ext pid=$BASHPID > | # trap 'echo "ext exit trap in $BASHPID"' EXIT > | > | (echo int pid=$BASHPID > | trap 'echo "int exit trap in $BASHPID"' EXIT > | sleep 9) & > | > | wait

bash completion of an option with a space in it, isn't double quoted

2019-03-26 Thread d3fault
From: d3fault To: bug-bash@gnu.org,b...@packages.debian.org Subject: bash completion of an option with a space in it, isn't double quoted Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOS

Re: bash completion of an option with a space in it, isn't double quoted

2019-03-26 Thread Chet Ramey
On 3/26/19 3:43 AM, d3fault wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > In the following example it auto-completes without putting double > quotes around "hi mom", which means a process would see it as 2 > separate args instead of 1. If you wan

Re: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Dmitry Goncharov
On Mon, Mar 25, 2019 at 6:24 PM Konstantin Andreev wrote: > Verified on: > > Solaris 11.3, bash 4.1.17(1)-release (i386-pc-solaris2.11) > CentOS Linux 7.2.1511, bash 4.2.46(1)-release (x86_64-redhat-linux-gnu) > CentOS Linux 7.2.1511, bash 5.0.0(1)-release (x86_64-pc-linux-gnu) Dou

Re[3]: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Konstantin Andreev
bash-5.0.3, - is it what is marked [Bash-5.0 patch 3: improve...] in bash.git? Just built and tested it. The systems are x86-64. + Debian GNU/Linux buster/sid (pre-10): works (both exit traps are invoked) (runs in virtual machine) kernel-4.18.0-3-amd64, glibc-2.28-6 - CentOS Linux 7.2.15

Re[5]: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Konstantin Andreev
btw, I can undertake some debugging, but I have no time to investigate how the bash code works. If you may provide me with enough details so that I would know where to look into the control flow, I would investigate what's happening. Regards, Konstantin Konstantin Andreev, 26 Mar 2019 19:44 M

Re: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Chet Ramey
On 3/26/19 12:44 PM, Konstantin Andreev wrote: > bash-5.0.3, - is it what is marked [Bash-5.0 patch 3: improve...] in bash.git? > Just built and tested it. The systems are x86-64. > > + Debian GNU/Linux buster/sid (pre-10): works (both exit traps are invoked) >     (runs in virtual machine) >    

Re[7]: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Konstantin Andreev
As you decide. Debian (working), subshell syscall trace on receiving sigterm: | $ strace -p 1436 | strace: Process 1436 attached | wait4(-1, 0x7ffd49d66b90, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) | --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1461, si_uid

Re: Re[7]: Subshell exit trap is not invoked if shell exit trap also set

2019-03-26 Thread Al Payne
Konstantin, I also tried to replicate on CentOS (under Fusion), but get the two expected trap messages when killing the internal process: ext pid=25449 int pid=25450 int exit trap in 25450 subshell done ext exit trap in 25449 Test install: - CentOS Linux release 7.2.1511 (Cor