home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!torvalds
- From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
- Newsgroups: comp.os.linux
- Subject: Re: C_A_D=0
- Message-ID: <1992Jul27.185353.5771@klaava.Helsinki.FI>
- Date: 27 Jul 92 18:53:53 GMT
- References: <1992Jul27.180447.28246@ifi.uio.no>
- Organization: University of Helsinki
- Lines: 38
-
- In article <1992Jul27.180447.28246@ifi.uio.no> janl@ifi.uio.no (Jan Nicolai Langfeldt) writes:
- >
- >I have mucked about with the kernel lately (0.96cpl2). When I set the
- >C_A_D varaible to 0 (to avoid reboot on pressing C-A-D) (and compile,
- >reboot :-). After login in and executing sync I press C-A-D and the
- >system locks, completely... Anyone with similar experiences?
-
- Setting 'C_A_D = 0' results in init being sent a SIGINT instead of a
- instant reboot when ctrl-alt-del is pressed. If you have the old init
- that doesn't handle a SIGINT, you get a very dead system: init dies, and
- everything essentially locks.
-
- There are two possible solutions to this:
-
- (a) get one of the newer init packages that handle SIGINT gracefully,
- and do a clean shutdown.
-
- (b) apply this "patch" (or wait for my next release):
-
- in linux/kernel/sys.c, ctrl_alt_del():
-
- ! if (task[1])
- send_sig(SIGINT,task[1],1);
-
- should be:
-
- ! if (task[1] && task[1].sigaction[SIGINT-1].sa_handler)
- send_sig(SIGINT,task[1],1);
-
- The patch essentially checks that a signal handler is present before
- sending the SIGINT. That way old init packages won't be surprised.
-
- Linus
-
- PS. I'll probably make patch3 to 0.96c available sometime later this
- week: the main new feature is a dynamic buffer-cache. The original
- patches were by oreilly, but have been almost totally rewritten by me.
- The IRQ code has also been edited and is hopefully stable now.
-