diff options
author | ache <ache@FreeBSD.org> | 1997-07-08 11:51:11 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-07-08 11:51:11 +0000 |
commit | 043d604a07ee170f26f1b5c6944be294899cd585 (patch) | |
tree | ced9c6c9b707053f3a251c026281dfcd0705cf2f /sbin/init | |
parent | a905367e5903383d1a99e8d3d16f065600dc9208 (diff) | |
download | FreeBSD-src-043d604a07ee170f26f1b5c6944be294899cd585.zip FreeBSD-src-043d604a07ee170f26f1b5c6944be294899cd585.tar.gz |
Move logwtmp(shutdown) call before any real action in death().
Diffstat (limited to 'sbin/init')
-rw-r--r-- | sbin/init/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; |