Messages in this thread | | | From | (Miquel van Smoorenburg) | Subject | Re: What to do on ctrl-alt-del? | Date | 14 Jul 1997 18:28:07 +0200 |
| |
In article <Pine.LNX.3.95.970714145503.21268i-100000@Galois.fs100.suse.de>, Hubert Mantel <mantel@suse.de> wrote: >Hi, > >if you call reboot(2) to disable ctrl-alt-del, SIGINT will be sent to >process 1 if the user presses ctrl-alt-del. This has been ok in the past >but since Linux has the unique initrd feature there is not always a >process with pid 1.
Why? Init is special in more ways then that one. For example, there should always be a process with pid 1, that adopts the processes without a parent and does a wait() to clean up after they die. Also, you can't kill process #1 with -STOP or -KILL.
>As initrd is intended and used for installation >purposes it might be necessary to allow linuxrc to intercept ctr-alt-del; >otherwise the system immediately reboots upon that key combination without >a clean shutdown. Wouldn't it be correct to send SIGINT to the process >that disabled ctrl-alt-del?
I don't think so since that makes the "ctrlaltdel" utility pretty useless.
How do you manage to end up without a process #1 anyway?
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 |
| |