From: Bob Doolittle (rad@think.com)
Date: 05/28/92


From: rad@think.com (Bob Doolittle)
Subject: Re: shutdown procedure?
Date: 28 May 1992 22:58:35 GMT

In article <1992May27.130956@tioga.ucsc.edu> sinster@tioga.ucsc.edu (Darren Senn) writes:

   After the time has expired, it forcibly logs off anyone who is logged in
   (including root), waits 30 seconds, then calls the system functions sync(),
   and reboot().

Actually, it's slightly (but importantly!) more complex. First it sends a
signal SIGTERM (15) to all processes and waits for them to die, then if
they stuck around it sends a SIGKILL (9) which is uncatchable.

The point of this procedure is to allow programs which wish to do their own
cleanup to catch SIGTERM, do their thing, and exit themselves cleanly. If
they don't explicitly catch SIGTERM they die unless they're really stuck,
in which case SIGKILL will take care of most of them.

-Bob