Article View: gnu.bash.bug
Article #224problem with bash 1.12.1 w/ trap
From: Ken Marshall
Date: Fri, 24 Jul 1992 17:39
Date: Fri, 24 Jul 1992 17:39
26 lines
1361 bytes
1361 bytes
Currently, I cannot get scripts with trap in them to work correctly
under bash version 1.12.1. Here is a simple delay script that does
not work:
delay=6
trap 'trap 14' 14
echo "What is your Quest? \c"
(sleep $delay; kill -14 $$ 2>/dev/null)&
read YourQuest
kill $! 2>/dev/null
[ ! -z "$YourQuest" ] && echo "Bah. Humbug. Not interested in $YourQuest" \
|| echo "You must be interested in something!"
Similarly, the following script hangs at the "who am i" if the trap line
is there. If the trap line is commented out, the scripts runs to completion.
PATH=/bin:/usr/bin
trap "" 1 2 3 4 5 6 7 8 '9' 10 11 12 13 14 15 16 17 18 \
19 20 21 22 23 24 25 26 27 28 29 30 31
set - $(who am i)
echo $1
Does anyone know of any patches for bash's signal handling code?
Thank you.
--Ken
Technical Details
Message-ID:
<ktm.711999546@oort>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!oort.cs.rice.edu!ktmShow Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!oort.cs.rice.edu!ktm From: ktm@oort.cs.rice.edu (Ken Marshall) Subject: problem with bash 1.12.1 w/ trap Message-ID: <ktm.711999546@oort> Summary: bash does not handle traps correctly. Keywords: bash, traps Sender: gnulists@ai.mit.edu Organization: Rice University, Houston, Texas Distribution: gnu Date: Fri, 24 Jul 1992 17:39:06 GMT Approved: bug-bash@prep.ai.mit.edu Lines: 27