9a10c35c9c388c525115431246c22cd3deaaa00d
[platform/upstream/bash.git] / tests / jobs.right
1 ./jobs2.sub: 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 0
20 ./jobs.tests: wait: job control not enabled
21 ./jobs.tests: fg: no job control
22 wait-for-pid
23 wait-errors
24 ./jobs.tests: wait: `1-1' is not a pid or valid job spec
25 ./jobs.tests: wait: `-4' is not a pid or valid job spec
26 wait-for-background-pids
27 async list wait-for-background-pids
28 async list wait for child
29 forked
30 wait-when-no-children
31 wait-for-job
32 ./jobs.tests: wait: %2: no such job
33 127
34 async list wait-for-job
35 forked
36 fg-bg 1
37 sleep 5
38 fg-bg 2
39 sleep 5
40 fg-bg 3
41 sleep 5
42 fg-bg 4
43 sleep 5
44 fg-bg 5
45 ./jobs.tests: fg: %2: no such job
46 ./jobs.tests: bg: bg background job?
47 fg-bg 6
48 ./jobs.tests: fg: illegal option: -s
49 fg: usage: fg [job_spec]
50 ./jobs.tests: bg: illegal option: -s
51 bg: usage: bg [job_spec]
52 ./jobs.tests: disown: illegal option: -s
53 disown: usage: disown [-h] [-ar] [jobspec ...]
54 ./jobs.tests: disown: %1: no such job
55 ./jobs.tests: disown: %2: no such job
56 wait-for-non-child
57 ./jobs.tests: wait: pid 1 is not a child of this shell
58 127
59 3 -- 1 2 3 -- 1 - 2 - 3
60 [1]   Running                 sleep 300 &
61 [2]-  Running                 sleep 350 &
62 [3]+  Running                 sleep 400 &
63 running jobs:
64 [1]   Running                 sleep 300 &
65 [2]-  Running                 sleep 350 &
66 [3]+  Running                 sleep 400 &
67 ./jobs.tests: kill: %4: no such job
68 ./jobs.tests: jobs: no such job %4
69 current job:
70 [3]+  Running                 sleep 400 &
71 previous job:
72 [2]-  Running                 sleep 350 &
73 after kill -STOP
74 running jobs:
75 [1]   Running                 sleep 300 &
76 [3]-  Running                 sleep 400 &
77 stopped jobs:
78 [2]+  Stopped                 sleep 350
79 after disown
80 [2]+  Stopped                 sleep 350
81 [3]-  Running                 sleep 400 &
82 running jobs:
83 [3]-  Running                 sleep 400 &
84 stopped jobs:
85 [2]+  Stopped                 sleep 350
86 after kill -s CONT
87 running jobs:
88 [2]+  Running                 sleep 350 &
89 [3]-  Running                 sleep 400 &
90 stopped jobs:
91 after kill -STOP, backgrounding %3:
92 [3]+ sleep 400 &
93 killing...
94 done
95 after KILL -STOP, foregrounding %1
96 sleep 10
97 done