xref: /freebsd/bin/sh/tests/execution/fork2.0 (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
1# $FreeBSD$
2
3result=$(${SH} -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!')
4test "$result" = sleep || exit 1
5
6result=$(${SH} -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait')
7test "$result" = trapped || exit 1
8
9exit 0
10