NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Removing /etc/nologin on shutdown
Date: Mon, 24 May 2010 16:09:21 -0500 (CDT)
From: "Jeremy C. Reed" <reed%reedmedia.net@localhost>
Message-ID:
<alpine.NEB.2.01.1005241604110.27426%t1.m.reedmedia.net@localhost>
| I misunderstand. halt (or reboot) sends SIGTERM to -1. shutdown has a
| handler for that signal which does the finish() (remove the
| /etc/nologin). I may be reading this wrong.
The last time I checked, the kernel did not replace the executable code
(that has been replaced by an exec) in a process so it can call a signal
handler that used to exist previously (when the signal later arrives).
That is, shutdown exec's reboot (or halt) when necessary, it doesn't
fork and hang about, once those things start, shutdown is done.
| Or halt/reboot can remove the file as another option.
They could, if the knowledge of that file is to be spread even further
than it has been so far. I'm not sure that's necessary though, the
potential gap isn't very big - the nologin thing is really intended to
stop people logging in and getting started doing real work in the period
after the "system is about to shut down" warning has been broadcast,
and before the shut down. That is, people get annoyed if they've just
gotten started on something real, and the system vanishes under them.
There's no actual problem with people just logging in in the final seconds,
that's harmless, so as long as the gap between when they can log in, and
when they get booted off again is small enough that they have no
opportunity to start doing whatever it is they regard as being productive,
there should be no real harm.
idleroux%fastmail.fm@localhost said:
| or should I just send-pr a patch?
I would - just submit a bug report on shutdown with a patch that unlinks
the nologin file just before the exec (in the gloriously named
die_you_gravy_sucking_pig_dog() function ...)
I can't think of a good reason that it shouldn't do that.
kre
Home |
Main Index |
Thread Index |
Old Index