shutdown(8) not working after upgrade to 10.1-BETA3
Yamagi Burmeister
lists at yamagi.org
Sat Oct 4 08:05:36 UTC 2014
On Fri, 3 Oct 2014 23:56:03 +0200
Jilles Tjoelker <jilles at stack.nl> wrote:
> The problem I reported is that a thread may start spinning instead of
> interrupting a pending close or revoke when a signal is received. This
> is not the case here. Pid 1 is not spinning but simply sleeping, and it
> tends not to receive signals at this point.
Okay, I didn't realize that.
> The problem here seems to be that the current definition of revoke(),
> which involves calling the device close function, is not suitable for
> calling from pid 1, since pid 1 should not wait indefinitely for tty
> output to drain.
>
> In fact, apart from one month in 1997 (SVN r27197-r27941), pid 1 only
> started calling revoke() in June 2009 (SVN r194198). Traditionally, only
> init's child processes called revoke().
>
> A dirty workaround could be to fork a process to perform these revoke()
> calls. Note that because of r259441, this process cannot use signals to
> limit how long it blocks, so pid 1 must not wait indefinitely for the
> process to terminate.
That sounds rather hacky. But at a very first glance I don't see a
better solution, too.
Thank you,
Yamagi
--
Homepage: www.yamagi.org
XMPP: yamagi at yamagi.org
GnuPG/GPG: 0xEFBCCBCB
More information about the freebsd-stable
mailing list