opnsense-src/tools/regression/bin/sh/execution/fork2.0
David E. O'Brien f3bf9b7a16 Allow one to regression test 'sh' changes without having to install
a potentially bad /bin/sh first.
2010-10-12 18:20:38 +00:00

9 lines
240 B
Text

# $FreeBSD$
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