On Wed, Jun 11, 2003 at 12:03:50PM -0400, Chun Kit Edwin Lau wrote: > 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?
If processes don't respond to SIGTERM, they will be sent SIGKILL shortly afterwards. It's not possible for a process to ignore that unless it's stuck in the kernel somewhere (and if it's stuck that badly you're probably not going to be able to get it back any other way anyway). Shutdown takes place by entering runlevel 0 (for halt) or 6 (for reboot), upon which the scripts in /etc/rc0.d or /etc/rc6.d respectively are run in turn. For example, /etc/rc0.d/S20sendsigs is the script whose action you refer to above. Cheers, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]