]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/jobs.right
bash-5.1 distribution sources and documentation
[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
d233b485
CR
19[1] Running sleep 2 &
20[2] Running sleep 2 &
21[3] Running sleep 2 &
22[4]- Running sleep 2 &
23[5]+ Running ( sleep 2; exit 4 ) &
b80f6443 244
d166f048 250
b80f6443 26i killed it
ac50fbac
CR
2712
28[1]- Running sleep 20 &
29[3]+ Running sleep 20 &
8868edaf
CR
305: ok 1
31./jobs5.sub: line 40: wait: %8: no such job
322: ok 2
332: ok 3
d233b485 34child1 exit status 0
8868edaf
CR
35[1]+ Running sleep 20 &
36./jobs7.sub: line 5: fg: no current jobs
37[1]+ Running sleep 20 &
b80f6443 380
8868edaf
CR
39./jobs.tests: line 40: wait: %1: no such job
40./jobs.tests: line 45: fg: no job control
d166f048
JA
41wait-for-pid
42wait-errors
8868edaf
CR
43./jobs.tests: line 58: wait: `1-1': not a pid or valid job spec
44./jobs.tests: line 59: wait: `-4': not a pid or valid job spec
d166f048
JA
45wait-for-background-pids
46async list wait-for-background-pids
47async list wait for child
48forked
49wait-when-no-children
8868edaf
CR
50posix jobs output
51[1]+ Done sleep 1
d166f048 52wait-for-job
8868edaf 53./jobs.tests: line 84: wait: %2: no such job
d166f048
JA
54127
55async list wait-for-job
56forked
57fg-bg 1
8868edaf 58sleep 2
d166f048 59fg-bg 2
8868edaf 60sleep 2
d166f048 61fg-bg 3
8868edaf 62sleep 2
d166f048 63fg-bg 4
8868edaf 64sleep 2
d166f048 65fg-bg 5
8868edaf
CR
66./jobs.tests: line 111: fg: %2: no such job
67./jobs.tests: line 112: bg: job 1 already in background
d166f048 68fg-bg 6
8868edaf 69./jobs.tests: line 119: fg: -s: invalid option
d166f048 70fg: usage: fg [job_spec]
8868edaf 71./jobs.tests: line 120: bg: -s: invalid option
95732b49 72bg: usage: bg [job_spec ...]
8868edaf 73./jobs.tests: line 125: disown: -s: invalid option
a0c0a00f 74disown: usage: disown [-h] [-ar] [jobspec ... | pid ...]
8868edaf
CR
75./jobs.tests: line 129: disown: %1: no such job
76./jobs.tests: line 132: disown: %2: no such job
d166f048 77wait-for-non-child
8868edaf 78./jobs.tests: line 135: wait: pid 1 is not a child of this shell
d166f048
JA
79127
803 -- 1 2 3 -- 1 - 2 - 3
cce855bc
JA
81[1] Running sleep 300 &
82[2]- Running sleep 350 &
83[3]+ Running sleep 400 &
d166f048 84running jobs:
cce855bc
JA
85[1] Running sleep 300 &
86[2]- Running sleep 350 &
87[3]+ Running sleep 400 &
8868edaf
CR
88./jobs.tests: line 152: kill: %4: no such job
89./jobs.tests: line 154: jobs: %4: no such job
cce855bc
JA
90current job:
91[3]+ Running sleep 400 &
92previous job:
93[2]- Running sleep 350 &
d166f048
JA
94after kill -STOP
95running jobs:
cce855bc
JA
96[1] Running sleep 300 &
97[3]- Running sleep 400 &
d166f048 98stopped jobs:
cce855bc 99[2]+ Stopped sleep 350
d166f048 100after disown
cce855bc
JA
101[2]+ Stopped sleep 350
102[3]- Running sleep 400 &
d166f048 103running jobs:
cce855bc 104[3]- Running sleep 400 &
d166f048 105stopped jobs:
cce855bc 106[2]+ Stopped sleep 350
d166f048
JA
107after kill -s CONT
108running jobs:
cce855bc
JA
109[2]+ Running sleep 350 &
110[3]- Running sleep 400 &
d166f048
JA
111stopped jobs:
112after kill -STOP, backgrounding %3:
113[3]+ sleep 400 &
114killing...
115done
116after KILL -STOP, foregrounding %1
8868edaf 117sleep 4
d166f048 118done