summaryrefslogtreecommitdiffstats
path: root/tests/jobs6.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/jobs6.sub14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/jobs6.sub b/tests/jobs6.sub
new file mode 100644
index 0000000..9ed59ee
--- /dev/null
+++ b/tests/jobs6.sub
@@ -0,0 +1,14 @@
+# framework to test `wait -f' which forces wait until a job exits
+set -o monitor
+sleep 5 &
+child1=$!
+
+( sleep 1; kill -STOP $child1 ; sleep 1 ; kill -CONT $child1 )&
+
+child2=$!
+
+wait -f %1
+echo child1 exit status $?
+
+wait $child2
+exit 0