home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / shell / 5041 < prev    next >
Encoding:
Text File  |  1992-12-11  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!nwnexus!Celestial.COM!ray
  3. From: ray@Celestial.COM (Ray Jones)
  4. Subject: Re: REALLY trapping INT
  5. Organization: Celestial Software, Mercer Island, WA
  6. Date: Sat, 12 Dec 1992 01:17:57 GMT
  7. Message-ID: <1992Dec12.011757.10515@Celestial.COM>
  8. References: <ByvExM.3Hv@techbook.com>
  9. Lines: 25
  10.  
  11. In <ByvExM.3Hv@techbook.com> jamesd@techbook.com (James Deibele) writes:
  12.  
  13. >I've got some newbies that I'd like to put into a menu.  No problem,
  14. >I'll write a shell program and use that as their login shell.  They can
  15. >still use all the UNIX commands, but I can show them what to do on
  16. >different menu pages.
  17.  
  18. >Hmmm.  ^C kills the program they're running all right, but it also kills
  19. >the menu shell.  Dip into the manual.  No problem.  I'll just trap INT
  20. >like so:
  21.  
  22. [..stuff deleted...]
  23.  
  24. >So: is there a 100% guaranteed way of turning off ^C while running a 
  25. >shell program while leaving it intact inside other programs?
  26.  
  27. I don't know about a 100% guarantee but...
  28. Try using stty to disable ^C at the beginning of your script, enable it just
  29. before each application is run and then disable it when comming back to the
  30. script.
  31. -- 
  32. INTERNET:  ray@Celestial.COM   Ray A. Jones; Celestial Software
  33. UUCP:   ...!thebes!camco!ray   6641 East Mercer Way
  34.              uunet!camco!ray   Mercer Island, WA 98040; (206) 947-5591
  35. The probability of one or more spelling errors in this missive approaches
  36.