hush: fix "wait PID"
It was not properly interruptible, and did not update job status (the exited processes were still thought of as running). function old new delta process_wait_result - 453 +453 wait_for_child_or_signal - 199 +199 run_list 996 1002 +6 checkjobs_and_fg_shell 41 43 +2 builtin_wait 328 215 -113 checkjobs 516 142 -374 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/2 up/down: 660/-487) Total: 173 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
2
shell/hush_test/hush-misc/wait1.right
Normal file
2
shell/hush_test/hush-misc/wait1.right
Normal file
@@ -0,0 +1,2 @@
|
||||
0
|
||||
[1] Running sleep 2
|
3
shell/hush_test/hush-misc/wait1.tests
Executable file
3
shell/hush_test/hush-misc/wait1.tests
Executable file
@@ -0,0 +1,3 @@
|
||||
sleep 2 & sleep 1 & wait $!
|
||||
echo $?
|
||||
jobs
|
2
shell/hush_test/hush-misc/wait2.right
Normal file
2
shell/hush_test/hush-misc/wait2.right
Normal file
@@ -0,0 +1,2 @@
|
||||
0
|
||||
[1] Running sleep 3
|
4
shell/hush_test/hush-misc/wait2.tests
Executable file
4
shell/hush_test/hush-misc/wait2.tests
Executable file
@@ -0,0 +1,4 @@
|
||||
sleep 3 & sleep 2 & sleep 1
|
||||
wait $!
|
||||
echo $?
|
||||
jobs
|
2
shell/hush_test/hush-misc/wait3.right
Normal file
2
shell/hush_test/hush-misc/wait3.right
Normal file
@@ -0,0 +1,2 @@
|
||||
3
|
||||
[1] Running sleep 2
|
3
shell/hush_test/hush-misc/wait3.tests
Executable file
3
shell/hush_test/hush-misc/wait3.tests
Executable file
@@ -0,0 +1,3 @@
|
||||
sleep 2 & (sleep 1;exit 3) & wait $!
|
||||
echo $?
|
||||
jobs
|
Reference in New Issue
Block a user