home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / bash / bug / 499 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.3 KB  |  42 lines

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