From 043d604a07ee170f26f1b5c6944be294899cd585 Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 8 Jul 1997 11:51:11 +0000 Subject: Move logwtmp(shutdown) call before any real action in death(). --- sbin/init/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin') diff --git a/sbin/init/init.c b/sbin/init/init.c index e3913db..a0b95c9 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: init.c,v 1.21 1997/07/04 22:09:07 ache Exp $ + * $Id: init.c,v 1.22 1997/07/05 19:36:55 ache Exp $ */ #ifndef lint @@ -1394,14 +1394,14 @@ death() pid_t pid; static const int death_sigs[2] = { SIGTERM, SIGKILL }; + /* NB: should send a message to the session logger to avoid blocking. */ + logwtmp("~", "shutdown", ""); + for (sp = sessions; sp; sp = sp->se_next) { sp->se_flags |= SE_SHUTDOWN; (void) revoke(sp->se_device); } - /* NB: should send a message to the session logger to avoid blocking. */ - logwtmp("~", "shutdown", ""); - for (i = 0; i < 2; ++i) { if (kill(-1, death_sigs[i]) == -1 && errno == ESRCH) return (state_func_t) single_user; -- cgit v1.1