Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14391 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-07-24 14:12 -0400 |
| Last post | 2018-07-24 14:12 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: "jobs" doesn't consistently expand function arguments Chet Ramey <chet.ramey@case.edu> - 2018-07-24 14:12 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-07-24 14:12 -0400 |
| Subject | Re: "jobs" doesn't consistently expand function arguments |
| Message-ID | <mailman.4152.1532455957.1292.bug-bash@gnu.org> |
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 chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web