home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 6792 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.7 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
  2. From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: C_A_D=0
  5. Message-ID: <1992Jul27.185353.5771@klaava.Helsinki.FI>
  6. Date: 27 Jul 92 18:53:53 GMT
  7. References: <1992Jul27.180447.28246@ifi.uio.no>
  8. Organization: University of Helsinki
  9. Lines: 38
  10.  
  11. In article <1992Jul27.180447.28246@ifi.uio.no> janl@ifi.uio.no (Jan Nicolai Langfeldt) writes:
  12. >
  13. >I have mucked about with the kernel lately (0.96cpl2). When I set the
  14. >C_A_D varaible to 0 (to avoid reboot on pressing C-A-D) (and compile,
  15. >reboot :-). After login in and executing sync I press C-A-D and the
  16. >system locks, completely... Anyone with similar experiences?
  17.  
  18. Setting 'C_A_D = 0' results in init being sent a SIGINT instead of a
  19. instant reboot when ctrl-alt-del is pressed.  If you have the old init
  20. that doesn't handle a SIGINT, you get a very dead system: init dies, and
  21. everything essentially locks. 
  22.  
  23. There are two possible solutions to this:
  24.  
  25. (a) get one of the newer init packages that handle SIGINT gracefully,
  26.     and do a clean shutdown.
  27.  
  28. (b) apply this "patch" (or wait for my next release):
  29.  
  30.     in linux/kernel/sys.c, ctrl_alt_del():
  31.  
  32. !         if (task[1])
  33.             send_sig(SIGINT,task[1],1);
  34.  
  35.     should be:
  36.  
  37. !         if (task[1] && task[1].sigaction[SIGINT-1].sa_handler)
  38.             send_sig(SIGINT,task[1],1);
  39.  
  40. The patch essentially checks that a signal handler is present before
  41. sending the SIGINT. That way old init packages won't be surprised.
  42.  
  43.         Linus
  44.  
  45. PS.  I'll probably make patch3 to 0.96c available sometime later this
  46. week: the main new feature is a dynamic buffer-cache.  The original
  47. patches were by oreilly, but have been almost totally rewritten by me. 
  48. The IRQ code has also been edited and is hopefully stable now. 
  49.