jobs -p falsely reports the last background pid

2014-04-09 Thread Håkon Bugge
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' -DCONF_VENDOR='redhat'\ -DLOCALEDIR='/usr/share/local

Re: jobs -p falsely reports the last background pid

2014-04-09 Thread Greg Wooledge
On Wed, Apr 09, 2014 at 12:43:40PM +0200, Håkon Bugge wrote: > This script never terminates: > -- > #!/bin/bash > > for P in `seq 5`; do > sleep 1& > done > > while true; do > usleep 2 > set foo `jobs -p` > LEFT=$# > LEFT=$

Re: jobs -p falsely reports the last background pid

2014-04-09 Thread Håkon Bugge
On 9. apr. 2014, at 14.04, Greg Wooledge wrote: > On Wed, Apr 09, 2014 at 12:43:40PM +0200, Håkon Bugge wrote: >> This script never terminates: >> -- >> #!/bin/bash >> >> for P in `seq 5`; do >>sleep 1& >> done >> >> while true; do >>usl

Re: jobs -p falsely reports the last background pid

2014-04-09 Thread Pierre Gaston
On Wed, Apr 9, 2014 at 3:16 PM, Håkon Bugge wrote: > > On 9. apr. 2014, at 14.04, Greg Wooledge wrote: > > > On Wed, Apr 09, 2014 at 12:43:40PM +0200, Håkon Bugge wrote: > >> This script never terminates: > >> -- > >> #!/bin/bash > >> > >> for P in

Re: jobs -p falsely reports the last background pid

2014-04-09 Thread Greg Wooledge
On Wed, Apr 09, 2014 at 02:16:22PM +0200, Håkon Bugge wrote: > That is not the issue. Try it out. Very well. I can confirm that this script does not terminate on HP-UX 10.20 under bash 4.3.8: #!/bin/bash set -m for x in 1 2 3 4 5; do sleep 1 & done while jobs=$(jobs -p) echo "jobs left: <$

Re: jobs -p falsely reports the last background pid

2014-04-09 Thread Pierre Gaston
On Wed, Apr 9, 2014 at 3:28 PM, Greg Wooledge wrote: > On Wed, Apr 09, 2014 at 02:16:22PM +0200, Håkon Bugge wrote: > > That is not the issue. Try it out. > > Very well. I can confirm that this script does not terminate on HP-UX > 10.20 under bash 4.3.8: > > #!/bin/bash > set -m > for x in 1 2 3

Re: Bash-4.3 Official Patch 3

2014-04-09 Thread Linda Walsh
Chet Ramey wrote: Bash-Release: 4.3 Patch-IDs: bash43-00{3..8} - Chet, patches 1 and 2 applied with no problems: but 3-8 don't follow the same pattern and give warnings no matter what: i=1;patch <../bash-4.3-patches/bash43-00$i patching file test.c patching file pat

Re: Bash-4.3 Official Patch 3

2014-04-09 Thread Chet Ramey
On 4/9/14, 8:47 PM, Linda Walsh wrote: > > > Chet Ramey wrote: >> Bash-Release:4.3 >> Patch-IDs:bash43-00{3..8} > - > > Chet, patches 1 and 2 applied with no problems: > but 3-8 don't follow the same pattern and give warnings no > matter what: > >> i=1;patch <../bash-4.