Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.unix.shell Subject: Re: Getting HUPed Message-ID: Date: 2 Apr 91 18:15:33 GMT References: <53767@mirror.tmc.com> <53902@mirror.tmc.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Distribution: na Organization: Xenix Support, FICC Lines: 16 In article krs@amdahl.uts.amdahl.com (Kris Stephens [Hail Eris!]) writes: > trap 'echo "signalled"' 0 > trap 'echo "signalled"; exit' 1 2 3 14 15 No, you should do: trap 'echo "signalled"; exit' 0 trap exit 1 2 3 14 15 Because (at least on some versions of the shell) the exit in the trap N triggers the trap 0, and you will get two "signalled" messages. -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?" Ewige Blumenkraft.