From: Maria Matejka Date: Wed, 28 Aug 2024 13:29:07 +0000 (+0200) Subject: Shutdown marker displaced to runtime X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2132907881214fa486eb97a828fe1290856ea17a;p=thirdparty%2Fbird.git Shutdown marker displaced to runtime --- diff --git a/conf/conf.c b/conf/conf.c index 2002fe69f..f15d90c30 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -75,7 +75,6 @@ static void config_done(void); static timer *config_timer; /* Timer for scheduled configuration rollback */ /* These are public just for cmd_show_status(), should not be accessed elsewhere */ -int shutting_down; /* Shutdown requested, do not accept new config changes */ int configuring; /* Reconfiguration is running */ int undo_available; /* Undo was not requested from last reconfiguration */ /* Note that both shutting_down and undo_available are related to requests, not processing */ diff --git a/lib/runtime.c b/lib/runtime.c index cf40c124f..f2507de9c 100644 --- a/lib/runtime.c +++ b/lib/runtime.c @@ -9,6 +9,8 @@ #include "lib/runtime.h" +int shutting_down = 0; + struct global_runtime global_runtime_initial = { .tf_log = { .fmt1 = "%F %T.%3f", diff --git a/lib/runtime.h b/lib/runtime.h index 455f89a80..450eb26af 100644 --- a/lib/runtime.h +++ b/lib/runtime.h @@ -9,6 +9,10 @@ #include "lib/timer.h" +/* Shutdown requested, behave accordingly. + * Initially zero, once set to one, never reset. */ +extern int shutting_down; + /* I/O loops log information about task scheduling */ enum latency_debug_flags { DL_PING = 1,