[fixed in 3.2] traps overwrite job names
Bug #41082 reported by
Sebastian Kapfer
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| bash (Ubuntu) |
Fix Released
|
Medium
|
Matthias Klose | ||
Bug Description
When a DEBUG trap is set, it overwrites the current foreground job's job name (name as seen in the 'jobs' listing).
Reproduction:
1. set trap, e.g. trap echo DEBUG
2. launch foreground process
3. Ctrl+Z to background it
4. type 'jobs'
Example:
sh-3.1$ sleep 600 &
[1] 2870
sh-3.1$ jobs
[1]+ Running sleep 600 &
sh-3.1$ fg
sleep 600
[1]+ Stopped(SIGTSTP) sleep 600
sh-3.1$ trap echo DEBUG
sh-3.1$ fg
sleep 600
[1]+ Stopped(SIGTSTP) sleep 600
sh-3.1$ sleep 600
[2]+ Stopped(SIGTSTP) echo
sh-3.1$ jobs
[1]- Stopped(SIGTSTP) sleep 600
[2]+ Stopped(SIGTSTP) echo
sh-3.1$
| Changed in bash: | |
| status: | Unconfirmed → Confirmed |
| description: | updated |
| Changed in bash: | |
| assignee: | nobody → doko |
| status: | Confirmed → In Progress |
To post a comment you must log in.

Upstream says this will be fixed in bash-3.2.