Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: What to do on ctrl-alt-del? | Date | 15 Jul 1997 22:50:02 +0200 |
| |
In article <Pine.LNX.3.95.970715194403.875A-100000@Galois.fs100.suse.de>, Hubert Mantel <mantel@suse.de> wrote: >Ok, this is the complete output of a typical install: > > PID TT STAT TIME COMMAND > 1 ? SW 0:01 swapper > 2 ? SW 0:00 kflushd > 3 ? SW< 0:00 kswapd > 4 ? SW 0:00 nfsiod > 5 ? SW 0:00 nfsiod > 6 ? SW 0:00 nfsiod > 7 ? SW 0:00 nfsiod > 8 1 S 0:01 linuxrc > 17 ? S 0:00 update (bdflush) > 18 2 S 0:00 bash > 20 5 S 0:00 bash > 21 6 S 0:00 bash > 24 1 S 0:00 /sbin/YaST > 42 2 R 0:02 ps -ax > >Linuxrc has spawned the bashes. Ok, you're right, there _is_ pid 1, but >it is not init and it is not linuxrc. So if ctrl-alt-del is pressed, the >machine will reboot. And you have no chance to prevent this.
What is the "swapper" process? I don't see it, neither on 2.0.30 or 2.1.44-3
[checks linux/init/main.c] ah, I see. Swapper is really pid#1, but in kernel mode. It spawns /linuxrc, and after that exits it executes /sbin/init. Now it's a bit more clear to me. Probably the kernel needs to be fixed so that the SIGINT gets sent to linuxrc_pid (a new global variable) if it is set and otherwise to process#1. That's probably the solution that makes the most sense. Then linuxrc is free to call ctrlaltdel to setup "soft" reboot if so required, and it can even catch SIGINT then to do something reasonable if ctrlaltdel is pressed.
Mike. -- | Miquel van Smoorenburg | "I need more space" "Well, why not move to Texas" | | miquels@cistron.nl | "No, on my account, stupid." "Stupid? Uh-oh.." | | PGP fingerprint: FE 66 52 4F CD 59 A5 36 7F 39 8B 20 F1 D6 74 02 |
| |