shell: add testsuite for "wait $pid" waiting for other tasks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
91e11eba6e
commit
d4dd48f294
2
shell/ash_test/ash-misc/wait7.right
Normal file
2
shell/ash_test/ash-misc/wait7.right
Normal file
@ -0,0 +1,2 @@
|
||||
Background1
|
||||
Ok:0
|
7
shell/ash_test/ash-misc/wait7.tests
Executable file
7
shell/ash_test/ash-misc/wait7.tests
Executable file
@ -0,0 +1,7 @@
|
||||
sleep 1 && echo "Background1" &
|
||||
pid=$!
|
||||
sleep 3 && echo "Background2: BUG!" &
|
||||
# Shouldn't wait for 2nd bkgd:
|
||||
wait $pid
|
||||
kill $!
|
||||
echo Ok:$?
|
2
shell/hush_test/hush-misc/wait7.right
Normal file
2
shell/hush_test/hush-misc/wait7.right
Normal file
@ -0,0 +1,2 @@
|
||||
Background1
|
||||
Ok:0
|
7
shell/hush_test/hush-misc/wait7.tests
Executable file
7
shell/hush_test/hush-misc/wait7.tests
Executable file
@ -0,0 +1,7 @@
|
||||
sleep 1 && echo "Background1" &
|
||||
pid=$!
|
||||
sleep 3 && echo "Background2: BUG!" &
|
||||
# Shouldn't wait for 2nd bkgd:
|
||||
wait $pid
|
||||
kill $!
|
||||
echo Ok:$?
|
Loading…
Reference in New Issue
Block a user