On 7/23/18 7:54 PM, Keith Thompson wrote: > Bash Version: 4.4 > Patch Level: 19 > Release Status: release > > Description: > The "jobs" command doesn't consistently expand function arguments > > Repeat-By: > For example: > > /bin/bash --login --noprofile > bash-4.4$ nap() { sleep "$@" ; } > bash-4.4$ nap 1234 > ^Z > [1]+ Stopped sleep "$@" > bash-4.4$ bg > [1]+ sleep "$@" & > bash-4.4$ nap 2345 & > [2] 9666 > bash-4.4$ jobs > [1]- Running sleep "$@" & > [2]+ Running nap 2345 & > bash-4.4$ > > The problem is the '"$@"' in the "jobs" output, which doesn't provide > any useful information.
This is how bash has behaved from its earliest days. The string associated with the child process (the object that can be suspended) is the command string before expansion. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/