mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
shutdown: use cond_clear_noupdate() to prevent nested service_stop()
When the system shuts down, or user changes runlevels, we don't have to call cond_clear_update(), because this can lead to nested service_stop() calls, which in turn lead to out of sync progress updates: [ .. ] Stopping Foo [ OK ] Stopping Bar [ OK ] Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
248f7d3110
commit
c221823654
2 files changed
+8
-2
No files matched your search
+5
-1
@@ -35,6 +35,7 @@
|
||||
#include "cond.h"
|
||||
#include "pid.h"
|
||||
#include "service.h"
|
||||
#include "sm.h"
|
||||
|
||||
struct cond_boot {
|
||||
TAILQ_ENTRY(cond_boot) link;
|
||||
@@ -214,7 +215,10 @@ static int do_delete(const char *fpath, const struct stat *sb, int tflag, struct
|
||||
err(1, "Failed removing condition %s", fpath);
|
||||
|
||||
cond = ptr + strlen(COND_BASE) + 1;
|
||||
cond_update(cond);
|
||||
if (sm_is_in_teardown(&sm))
|
||||
cond_clear_noupdate(cond);
|
||||
else
|
||||
cond_update(cond);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user