hush: rework "wait %jobspec" to work in non-interactive shells too
Also add tests. wait5.tests so far fails (but works for ash and dash). function old new delta builtin_wait 305 283 -22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
1
shell/hush_test/hush-misc/wait4.right
Normal file
1
shell/hush_test/hush-misc/wait4.right
Normal file
@ -0,0 +1 @@
|
||||
Three:3
|
2
shell/hush_test/hush-misc/wait4.tests
Executable file
2
shell/hush_test/hush-misc/wait4.tests
Executable file
@ -0,0 +1,2 @@
|
||||
sleep 1 | (sleep 1;exit 3) & wait %1
|
||||
echo Three:$?
|
2
shell/hush_test/hush-misc/wait5.right
Normal file
2
shell/hush_test/hush-misc/wait5.right
Normal file
@ -0,0 +1,2 @@
|
||||
Zero:0
|
||||
Three:3
|
5
shell/hush_test/hush-misc/wait5.tests
Executable file
5
shell/hush_test/hush-misc/wait5.tests
Executable file
@ -0,0 +1,5 @@
|
||||
sleep 0 | (sleep 0;exit 3) &
|
||||
sleep 1
|
||||
echo Zero:$?
|
||||
wait %1
|
||||
echo Three:$?
|
Reference in New Issue
Block a user