]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - tools/regression/bin/sh/execution/fork2.0
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / tools / regression / bin / sh / execution / fork2.0
1 # $FreeBSD$
2
3 result=$(${SH} -c '(/bin/sleep 1)& sleep 0.1; ps -p $! -o comm=; kill $!')
4 test "$result" = sleep || exit 1
5
6 result=$(${SH} -c '{ trap "echo trapped" EXIT; (/usr/bin/true); } & wait')
7 test "$result" = trapped || exit 1
8
9 exit 0