Re: Strange behaviour from jobs -p in a subshell

2018-11-14 Thread Christopher Jefferson
On 13/11/2018 14:59, Chet Ramey wrote: > On 11/13/18 4:28 AM, Christopher Jefferson wrote: >> Consider the following script. While the 3 sleeps are running, both jobs >> -p and $(jobs -p) will print 3 PIDs. Once the 3 children are finished, >> jobs -p will continue to print t

Strange behaviour from jobs -p in a subshell

2018-11-13 Thread Christopher Jefferson
Consider the following script. While the 3 sleeps are running, both jobs -p and $(jobs -p) will print 3 PIDs. Once the 3 children are finished, jobs -p will continue to print the 3 PIDs of the done Children, but $(jobs -p) will only print 1 PID. $(jobs -p) always seems to print at most 1 PID of