]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/jobs.right
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / jobs.right
CommitLineData
b80f6443 1./jobs2.sub: line 9: fg: job 1 started without job control
cce855bc 2fg: 1
bb70624e
JA
3Waiting for job 0
4job 0 returns 0
5Waiting for job 1
6job 1 returns 0
7Waiting for job 2
8job 2 returns 0
9Waiting for job 3
10job 3 returns 0
11Waiting for job 4
12job 4 returns 0
13Waiting for job 5
14job 5 returns 0
15Waiting for job 6
16job 6 returns 0
17Waiting for job 7
18job 7 returns 0
b80f6443
JA
19[1] Running sleep 5 &
20[2] Running sleep 5 &
21[3] Running sleep 5 &
22[4]- Running sleep 5 &
23[5]+ Running ( sleep 5; exit 4 ) &
244
d166f048 250
b80f6443 26i killed it
ac50fbac
CR
2712
28[1]- Running sleep 20 &
29[3]+ Running sleep 20 &
b80f6443 300
ac50fbac
CR
31./jobs.tests: line 22: wait: %1: no such job
32./jobs.tests: line 27: fg: no job control
d166f048
JA
33wait-for-pid
34wait-errors
ac50fbac
CR
35./jobs.tests: line 40: wait: `1-1': not a pid or valid job spec
36./jobs.tests: line 41: wait: `-4': not a pid or valid job spec
d166f048
JA
37wait-for-background-pids
38async list wait-for-background-pids
39async list wait for child
40forked
41wait-when-no-children
42wait-for-job
ac50fbac 43./jobs.tests: line 63: wait: %2: no such job
d166f048
JA
44127
45async list wait-for-job
46forked
47fg-bg 1
48sleep 5
49fg-bg 2
50sleep 5
51fg-bg 3
52sleep 5
53fg-bg 4
54sleep 5
55fg-bg 5
ac50fbac
CR
56./jobs.tests: line 90: fg: %2: no such job
57./jobs.tests: line 91: bg: job 1 already in background
d166f048 58fg-bg 6
ac50fbac 59./jobs.tests: line 98: fg: -s: invalid option
d166f048 60fg: usage: fg [job_spec]
ac50fbac 61./jobs.tests: line 99: bg: -s: invalid option
95732b49 62bg: usage: bg [job_spec ...]
ac50fbac 63./jobs.tests: line 104: disown: -s: invalid option
cce855bc 64disown: usage: disown [-h] [-ar] [jobspec ...]
ac50fbac
CR
65./jobs.tests: line 108: disown: %1: no such job
66./jobs.tests: line 111: disown: %2: no such job
d166f048 67wait-for-non-child
ac50fbac 68./jobs.tests: line 114: wait: pid 1 is not a child of this shell
d166f048
JA
69127
703 -- 1 2 3 -- 1 - 2 - 3
cce855bc
JA
71[1] Running sleep 300 &
72[2]- Running sleep 350 &
73[3]+ Running sleep 400 &
d166f048 74running jobs:
cce855bc
JA
75[1] Running sleep 300 &
76[2]- Running sleep 350 &
77[3]+ Running sleep 400 &
ac50fbac
CR
78./jobs.tests: line 131: kill: %4: no such job
79./jobs.tests: line 133: jobs: %4: no such job
cce855bc
JA
80current job:
81[3]+ Running sleep 400 &
82previous job:
83[2]- Running sleep 350 &
d166f048
JA
84after kill -STOP
85running jobs:
cce855bc
JA
86[1] Running sleep 300 &
87[3]- Running sleep 400 &
d166f048 88stopped jobs:
cce855bc 89[2]+ Stopped sleep 350
d166f048 90after disown
cce855bc
JA
91[2]+ Stopped sleep 350
92[3]- Running sleep 400 &
d166f048 93running jobs:
cce855bc 94[3]- Running sleep 400 &
d166f048 95stopped jobs:
cce855bc 96[2]+ Stopped sleep 350
d166f048
JA
97after kill -s CONT
98running jobs:
cce855bc
JA
99[2]+ Running sleep 350 &
100[3]- Running sleep 400 &
d166f048
JA
101stopped jobs:
102after kill -STOP, backgrounding %3:
103[3]+ sleep 400 &
104killing...
105done
106after KILL -STOP, foregrounding %1
107sleep 10
108done