`jobs` within command substitution doesn't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey.

With dash 0.5.12-9 from Debian unstable, it seem jobs doesn't work
within command substitution.

In bash:
$ sleep 60 &
[1] 140013
$ jobs -p
140013
$ echo $(jobs -p)
140013
$ 


but in dash:
$ sleep 60 &
$ jobs -p
140049
$ echo $(jobs -p)

$ 


Not really sure whether that’s behaviour which POSIX would allow, but
at least it makes it more or less impossible to easily get the PIDs of
and jobs within scripts.


Cheers,
Chris.





[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux