← Commit list

a9cc8961e

Eric Andersen
Eric Andersen
2002-09-16
FAILED Duration: 6s

Subject

Let people run SHUTDOWN actions prior to killing everything -Erik

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

init/init.c+5 -3
@@ -715,6 +715,11 @@ static void shutdown_system(void)
{
sigset_t block_signals;
+ /* run everything to be run at "shutdown". This is done _prior_
+ * to killing everything, in case people wish to use scripts to
+ * shut things down gracefully... */
+ run_actions(SHUTDOWN);
+
/* first disable all our signals */
sigemptyset(&block_signals);
sigaddset(&block_signals, SIGHUP);
@@ -744,9 +749,6 @@ static void shutdown_system(void)
kill(-1, SIGKILL);
sleep(1);
- /* run everything to be run at "shutdown" */
- run_actions(SHUTDOWN);
-
sync();
if (kernelVersion > 0 && kernelVersion <= KERNEL_VERSION(2, 2, 11)) {
/* bdflush, kupdate not needed for kernels >2.2.11 */