Messages in this thread | | | Date | Tue, 1 Apr 1997 12:22:13 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: what is a halted kernel supposed to do? |
| |
On Tue, 1 Apr 1997, Louis Mandelstam wrote:
> On Mon, 31 Mar 1997, Marty Leisner wrote: > > > What is a system supposed to do when its halted? > > > > My linux 2.0.29 system still responds to pings. > > > > My freebsd 2.2 seems to be dead. > > > > When we halt, everything should turn off...(pings are > > often an indication a system is alive). > > I don't think this needs to be a kernel problem. > > You could get your shutdown script logic to simply ifconfig all your > interfaces down before 'halting'. > > Does the Linux kernel even have such a thing as a 'halted' state? I would > have a assumed we just end up with no processes running and all > filesystems umounted.
You have discovered an interesting item. If a remote system panics, you may not know it unless there is a fire :^)
../linux/arch/i386/kernel/process.c contains an empty procedure called machine_halt(). This is not called on a shutdown and it is not called during a panic. Even if it was, it would do nothing.
If you add the following code:
void machine_halt() { outb(0x21, 2); /* Leave ONLY the keyboard enabled */ for(;;) ; }
If this was called after a halt or after a panic, it would give the results you desire, i.e., the network would not work but you could ctrl-alt-del from the keyboard.
Cheers, Dick Johnson -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard B. Johnson Project Engineer Analogic Corporation Voice : (508) 977-3000 ext. 3754 Fax : (508) 532-6097 Modem : (508) 977-6870 Ftp : ftp@boneserver.analogic.com Email : rjohnson@analogic.com, johnson@analogic.com Penguin : Linux version 2.1.30 on an i586 machine (66.15 BogoMips). Warning : I read unsolicited mail for $350.00 per hour. Supply billing address. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| |