DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: init(8): Resurrect kern.shutdown_timeout as kern.init_shutdown_timeout.


From: Sascha Wildner <swildner@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Nov 2012 15:00:20 -0800 (PST)

commit 699c19e31bf2b6ff06419fd2802b560f86c3693f
Author: Sascha Wildner <saw@online.de>
Date:   Wed Nov 14 23:57:04 2012 +0100

    init(8): Resurrect kern.shutdown_timeout as kern.init_shutdown_timeout.
    
    Taken from FreeBSD. Quoting their commit msg:
    
    Fix system shutdown timeout handling by again supporting longer running
    shutdown procedures (which have a duration of more than 120 seconds).
    
    We have two user-space affecting shutdown timeouts: a "soft" one in
    /etc/rc.shutdown and a "hard" one in init(8). The first one can be
    configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
    to 30 seconds. The second one was originally (in 1998) intended to be
    configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
    to 120 seconds.
    
    Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
    (as it obviously is actually not used within the kernel itself) and
    hence was intentionally but misleadingly removed in revision 1.107 from
    init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
    control user-space processes in general, but in this particular case the
    sysctl(8) variable should have remained as it supports init(8), which
    isn't passed command line flags (which in turn could have been set via
    /etc/rc.conf), etc.
    
    As there is already a similar "kern.init_path" sysctl(8) variable which
    directly affects init(8), resurrect the init(8) shutdown timeout under
    sysctl(8) variable "kern.init_shutdown_timeout". But this time document
    it as being intentionally unused within the kernel and used by init(8).
    Also document it in the manpages init(8) and rc.conf(5).

Summary of changes:
 sbin/init/init.8         |    9 +++++++--
 sbin/init/init.c         |    2 +-
 share/man/man5/rc.conf.5 |   17 ++++++++++++++++-
 sys/kern/init_main.c     |   12 ++++++++++++
 4 files changed, 36 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/699c19e31bf2b6ff06419fd2802b560f86c3693f


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]