Date: Wed, 25 Oct 2017 15:30:44 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324988 - head/sys/kern Message-ID: <201710251530.v9PFUiBf020636@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Oct 25 15:30:44 2017 New Revision: 324988 URL: https://svnweb.freebsd.org/changeset/base/324988 Log: Handle RB_POWERCYCLE in the MI part of the kernel Signal init with SIGWINCH in shutdown_nice for RB_POWERCYCLE. Sponsored by: Netflix Modified: head/sys/kern/kern_shutdown.c Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Wed Oct 25 15:30:40 2017 (r324987) +++ head/sys/kern/kern_shutdown.c Wed Oct 25 15:30:44 2017 (r324988) @@ -283,6 +283,8 @@ shutdown_nice(int howto) PROC_LOCK(initproc); if (howto & RB_POWEROFF) kern_psignal(initproc, SIGUSR2); + else if (howto & RB_POWERCYCLE) + kern_psignal(initproc, SIGWINCH); else if (howto & RB_HALT) kern_psignal(initproc, SIGUSR1); else @@ -817,7 +819,7 @@ static void poweroff_wait(void *junk, int howto) { - if (!(howto & RB_POWEROFF) || poweroff_delay <= 0) + if ((howto & (RB_POWEROFF | RB_POWERCYCLE)) == 0 || poweroff_delay <= 0) return; DELAY(poweroff_delay * 1000); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710251530.v9PFUiBf020636>