1
0

Compare commits

..

No commits in common. "b9b85991691b2c0de1b33a8fa760da1b8b49eb6c" and "f286c141b3b4e88bdfeb01f3171387ca5d9a2ec9" have entirely different histories.

3 changed files with 4 additions and 11 deletions

View File

@ -1,6 +0,0 @@
#!/bin/bash
kill_child_jobs() {
# From https://stackoverflow.com/a/360275
while kill %% 2>/dev/null; do sleep 0; done
}

View File

@ -9,7 +9,6 @@ echo " ∞=script does not halt (after 1 second timeout)"
echo " X=disown unsupported by shell" echo " X=disown unsupported by shell"
echo " ☠=all children killed" echo " ☠=all children killed"
echo " 🏃=all children still running" echo " 🏃=all children still running"
echo " ✔️=expected result (job killed, disowned child alive)"
echo echo
printf '\t' printf '\t'

View File

@ -49,23 +49,23 @@ sleep 0.1s
if grep -q '^shell does not support disown$' "$TMP" if grep -q '^shell does not support disown$' "$TMP"
then then
printf 'X' printf "X"
fi fi
if ! grep -q '^disowned outlived parent.$' "$TMP" if ! grep -q '^disowned outlived parent.$' "$TMP"
then then
# disowned should have outlived parent # disowned should have outlived parent
EXITCODE=2 EXITCODE=2
printf '☠' printf "☠"
elif grep -q '^job outlived parent.$' "$TMP" elif grep -q '^job outlived parent.$' "$TMP"
then then
# job should not outlive parent # job should not outlive parent
EXITCODE=3 EXITCODE=3
printf '🏃' printf "🏃"
else else
# all good # all good
EXITCODE=0 EXITCODE=0
printf '✔️' printf '%s' "$SHELL"
fi fi
rm -f "$TMP" rm -f "$TMP"