config root man

Current Path : /compat/linux/proc/self/root/usr/src/tools/regression/bin/sh/builtins/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/src/tools/regression/bin/sh/builtins/exec2.0

# $FreeBSD: release/9.1.0/tools/regression/bin/sh/builtins/exec2.0 213738 2010-10-12 18:20:38Z obrien $

failures=
failure() {
	echo "Error at line $1" >&2
	failures=x$failures
}

(
	exec -- >/dev/null
	echo bad
)
[ $? = 0 ] || failure $LINENO
(
	exec -- ${SH} -c 'exit 42'
	echo bad
)
[ $? = 42 ] || failure $LINENO
(
	exec -- /var/empty/nosuch
	echo bad
) 2>/dev/null
[ $? = 127 ] || failure $LINENO

test -z "$failures"

Man Man