Why can "ctrl+alt+del" cause problems with shutdown?

Why can "ctrl+alt+del" cause problems with shutdown?

Post by wseg.. » Mon, 15 Nov 1999 04:00:00



I learned about the "shutdown" command when I played with an early version of
Slackware.  A friend of mine, however, is newer to Linux than I and was using
the three finger salute to shutdown her system.  This caused problems.  I think
the file system was not being unmounted properly.  Since she started using the
"shutdown " command, the problems have disappeared.

My curriosity has gotten the better of me and I would like to know why this was
causing her problems because, AFAIR, "ctrl+alt+del" is interpreted as either
"shutdown -h now" or "shutdown -r now," no?  BTW, she was running either RH 5.2
or (more likely) Mandrake 6.0.

Thanks in advance,

Wade Segade


 
 
 

Why can "ctrl+alt+del" cause problems with shutdown?

Post by Anita Lew » Mon, 15 Nov 1999 04:00:00


It is not a problem if this is in /etc/inittab:

# Trap CTRL-ALT-DELETE    
ca::ctrlaltdel:/sbin/shutdown -t3 -r now  

That makes it do the proper shutdown command.  Some distros don't have
that.

Anita



>I learned about the "shutdown" command when I played with an early version of
>Slackware.  A friend of mine, however, is newer to Linux than I and was using
>the three finger salute to shutdown her system.  This caused problems.  I think
>the file system was not being unmounted properly.  Since she started using the
>"shutdown " command, the problems have disappeared.

>My curriosity has gotten the better of me and I would like to know why this was
>causing her problems because, AFAIR, "ctrl+alt+del" is interpreted as either
>"shutdown -h now" or "shutdown -r now," no?  BTW, she was running either RH 5.2
>or (more likely) Mandrake 6.0.

>Thanks in advance,

>Wade Segade




 
 
 

Why can "ctrl+alt+del" cause problems with shutdown?

Post by Raffaello Brech » Tue, 16 Nov 1999 04:00:00



> It is not a problem if this is in /etc/inittab:

> # Trap CTRL-ALT-DELETE
> ca::ctrlaltdel:/sbin/shutdown -t3 -r now

> That makes it do the proper shutdown command.  Some distros don't have
> that.

> Anita



> >I learned about the "shutdown" command when I played with an early version of
> >Slackware.  A friend of mine, however, is newer to Linux than I and was using
> >the three finger salute to shutdown her system.  This caused problems.  I think
> >the file system was not being unmounted properly.  Since she started using the
> >"shutdown " command, the problems have disappeared.

> >Wade Segade



Hi out there !

its correct that the best place (and probably only place) for trapping
ctrlaltdel
is in /etc/inittab. You can call any program there
(echo "HAHAHA !!!" >/dev/console :) ). `shutdown` has several options,
and one of
them tells init how much time to wait between sigterm and sigkill. So
some daemons
or other processes are probably not given enough time to terminate and
leaving
zombies or arentt killed sucessful in any way. These left processes are
sometimes
the reason why the kernel cant umount some filesystems.
Ive no linux-machine in front of me right now, so i cant tell you
which option
to tweak for shutdown in /etc/inittab. RTFM :)

happy Y2K !

--
Raffaello Brecht