a59f817491
The parser considered 'trap exit INT' to reset the default for both EXIT and INT. This beahvior is not POSIX compliant. This was avoided if a value was specified for 'exit', but then disallows exiting with the signal received. A possible workaround is using ' exit'. However POSIX does allow this type of behavior if the parameters are all integers. Fix the handling for this and clarify its support in the manpage since it is specifically allowed by POSIX. Differential Revision: https://reviews.freebsd.org/D2325 Reviewed by: jilles MFC after: 2 weeks
6 lines
113 B
Plaintext
6 lines
113 B
Plaintext
# $FreeBSD$
|
|
|
|
(${SH} -c 'term(){ exit 5;}; trap term TERM; kill -TERM $$') &
|
|
wait >/dev/null 2>&1 $!
|
|
[ $? -eq 5 ]
|