]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/execution/fork2.0
shell_cmds-203.tar.gz
[apple/shell_cmds.git] / sh / tests / execution / fork2.0
CommitLineData
deb63bfb 1# $FreeBSD: head/bin/sh/tests/execution/fork2.0 213738 2010-10-12 18:20:38Z obrien $
71aad674
A
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