summary refs log tree commit diff
path: root/bin/cash/tests/execution/fork2.0
blob: 9cd64b618eb2b09f6592657e4a2e2fb310da5058 (plain) (blame)
1
2
3
4
5
6
7
8
9
# $FreeBSD: releng/12.0/bin/sh/tests/execution/fork2.0 213738 2010-10-12 18:20:38Z obrien $

result=$(${SH} -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!')
test "$result" = sleep || exit 1

result=$(${SH} -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait')
test "$result" = trapped || exit 1

exit 0