Thus spake Chun Kit Edwin Lau: > Hi everyone, > > I am curious about how Linux does the shutdown. The kernel send > the TERM signal to all processes when the shutdown is initiated. But > does the kernel wait for the every process to finish before the kernel > halt? If not, will there be data lost then?
The various system init scripts are called in the proper order. After that, init sends a TERM signal to all processes. After a short delay, init sends a KILL signal to all remaining processes. Once everything in userspace is dead, it unmounts the filesystems and reboots the machine. -- Nathan Poznick <[EMAIL PROTECTED]> It is better to be beautiful than to be good. But it is better to be good than to be ugly. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]