mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
Ensure new job IDs are never smaller than existing running jobs
This makes job IDs "monotone" in the sense that newly spawned jobs always have larger IDs than existing jobs, as requested in #6053
This commit is contained in:
@@ -29,6 +29,23 @@ jobs
|
||||
#CHECK: 2{{.*\t}}sleep 200 &
|
||||
#CHECK: 1{{.*\t}}sleep 100 &
|
||||
|
||||
# Kill job 2; the next job should have job ID 4 because 3 is still in use (#6053).
|
||||
|
||||
status job-control interactive
|
||||
command kill -9 $tokill[2]
|
||||
set -e tokill[2]
|
||||
status job-control full
|
||||
sleep 400 &
|
||||
set -g tokill $tokill $last_pid
|
||||
|
||||
jobs
|
||||
|
||||
#CHECK: Job Group{{.*}}
|
||||
#CHECK: 4{{.*\t}}sleep 400 &
|
||||
#CHECK: 3{{.*\t}}sleep 300 &
|
||||
#CHECK: 1{{.*\t}}sleep 100 &
|
||||
|
||||
|
||||
status job-control interactive
|
||||
|
||||
for pid in $tokill
|
||||
|
||||
Reference in New Issue
Block a user