]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/jobs.right
bash-5.1 beta release
[thirdparty/bash.git] / tests / jobs.right
1 ./jobs2.sub: line 9: fg: job 1 started without job control
2 fg: 1
3 Waiting for job 0
4 job 0 returns 0
5 Waiting for job 1
6 job 1 returns 0
7 Waiting for job 2
8 job 2 returns 0
9 Waiting for job 3
10 job 3 returns 0
11 Waiting for job 4
12 job 4 returns 0
13 Waiting for job 5
14 job 5 returns 0
15 Waiting for job 6
16 job 6 returns 0
17 Waiting for job 7
18 job 7 returns 0
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 ) &
24 4
25 0
26 i killed it
27 12
28 [1]- Running sleep 20 &
29 [3]+ Running sleep 20 &
30 5: ok 1
31 ./jobs5.sub: line 40: wait: %8: no such job
32 2: ok 2
33 2: ok 3
34 child1 exit status 0
35 [1]+ Running sleep 20 &
36 ./jobs7.sub: line 5: fg: no current jobs
37 [1]+ Running sleep 20 &
38 0
39 ./jobs.tests: line 40: wait: %1: no such job
40 ./jobs.tests: line 45: fg: no job control
41 wait-for-pid
42 wait-errors
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
45 wait-for-background-pids
46 async list wait-for-background-pids
47 async list wait for child
48 forked
49 wait-when-no-children
50 posix jobs output
51 [1]+ Done sleep 1
52 wait-for-job
53 ./jobs.tests: line 84: wait: %2: no such job
54 127
55 async list wait-for-job
56 forked
57 fg-bg 1
58 sleep 2
59 fg-bg 2
60 sleep 2
61 fg-bg 3
62 sleep 2
63 fg-bg 4
64 sleep 2
65 fg-bg 5
66 ./jobs.tests: line 111: fg: %2: no such job
67 ./jobs.tests: line 112: bg: job 1 already in background
68 fg-bg 6
69 ./jobs.tests: line 119: fg: -s: invalid option
70 fg: usage: fg [job_spec]
71 ./jobs.tests: line 120: bg: -s: invalid option
72 bg: usage: bg [job_spec ...]
73 ./jobs.tests: line 125: disown: -s: invalid option
74 disown: usage: disown [-h] [-ar] [jobspec ... | pid ...]
75 ./jobs.tests: line 129: disown: %1: no such job
76 ./jobs.tests: line 132: disown: %2: no such job
77 wait-for-non-child
78 ./jobs.tests: line 135: wait: pid 1 is not a child of this shell
79 127
80 3 -- 1 2 3 -- 1 - 2 - 3
81 [1] Running sleep 300 &
82 [2]- Running sleep 350 &
83 [3]+ Running sleep 400 &
84 running jobs:
85 [1] Running sleep 300 &
86 [2]- Running sleep 350 &
87 [3]+ Running sleep 400 &
88 ./jobs.tests: line 152: kill: %4: no such job
89 ./jobs.tests: line 154: jobs: %4: no such job
90 current job:
91 [3]+ Running sleep 400 &
92 previous job:
93 [2]- Running sleep 350 &
94 after kill -STOP
95 running jobs:
96 [1] Running sleep 300 &
97 [3]- Running sleep 400 &
98 stopped jobs:
99 [2]+ Stopped sleep 350
100 after disown
101 [2]+ Stopped sleep 350
102 [3]- Running sleep 400 &
103 running jobs:
104 [3]- Running sleep 400 &
105 stopped jobs:
106 [2]+ Stopped sleep 350
107 after kill -s CONT
108 running jobs:
109 [2]+ Running sleep 350 &
110 [3]- Running sleep 400 &
111 stopped jobs:
112 after kill -STOP, backgrounding %3:
113 [3]+ sleep 400 &
114 killing...
115 done
116 after KILL -STOP, foregrounding %1
117 sleep 4
118 done