[fixed in 3.2] traps overwrite job names

Bug #41082 reported by Sebastian Kapfer
6
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$

Revision history for this message
Sebastian Kapfer (caci) wrote :

Upstream says this will be fixed in bash-3.2.

Matthias Klose (doko)
Changed in bash:
status: Unconfirmed → Confirmed
description: updated
Matthias Klose (doko)
Changed in bash:
assignee: nobody → doko
status: Confirmed → In Progress
Revision history for this message
Matthias Klose (doko) wrote :

fixed in 3.2-0ubuntu1

Changed in bash:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.