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 " ☠=all children killed"
echo " 🏃=all children still running"
echo " ✔️=expected result (job killed, disowned child alive)"
echo
printf '\t'

View File

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