summaryrefslogtreecommitdiffhomepage
path: root/tests/posix/sigchld-ign.sh
blob: f9573ed8bd251ef03fefb5bdadbfbd81936aa6b7 (plain)
1
2
3
4
5
6
7
8
# A parent that ignores SIGCHLD must not make every command status 127: the
# shell resets it to the default at startup.
command -v python3 >/dev/null 2>&1 || exit 77
[ -x /bin/true ] || exit 77
python3 -c 'import os, signal, sys
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
os.execv(sys.argv[1], [sys.argv[1], "-c", "/bin/true; echo rc=$?"])' \
    "$(command -v "$TSH")"