[comp.sys.nsc.32k] /bin/sh and trap

sverre@lev.Seri.GOV (Sverre Froyen) (03/08/91)

It appears that the trap command in /bin/sh does not work.
Try to run the following script:

#!/bin/sh
trap '
	echo "status=$status"
	exit $status
' 0
trap exit 1 2 3 13 15
status=2

With /bin/sh it produces no output and 0 exit status.  With bash and
on several other computers it echos the status= line and sets the
output status to 2.  Has anyone a fix for this?

This is my final unresolved problem in getting a fully working rcs.

Sverre
-- 
Sverre Froyen
sverre@seri.gov, sunpeaks!seri!sverre