From e6902abfddb4d7b16dc9a4231a3781f354a08cd5 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 19 Feb 2016 08:41:12 +0200 Subject: Revamp program termination after reconfiguring. * src/pies.h (PIES_CHLD_GC): New op. (progman_stop_tag): Remove proto. * src/pies.c (main): Handle PIES_CHLD_GC: stop all programs marked for termination. * src/comp.c (component_config_commit): Mark leftover components for termination, instead of waiting for them to terminate. * src/sysvinit.c (runlevel_setup_prog): Skip prog if its active status didn't change. Mark inactivated progs for termination. (sysvinit_runlevel_setup): Schedule PIES_CHLD_GC. (inittrans): Don't wait for programs to terminate. That will be done in the main loop. * src/prog.h (prog): New boolean member. * src/progman.c (progman_cleanup) (progman_stop_component): Clear the stop flag. (progman_gc): New function. (progman_stop_tag): Remove. --- src/pies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pies.h') diff --git a/src/pies.h b/src/pies.h index 9a3dfca..b61e11b 100644 --- a/src/pies.h +++ b/src/pies.h @@ -318,6 +318,7 @@ void free_action (struct action *act); #define PIES_CHLD_NONE 0 #define PIES_CHLD_CLEANUP 0x01 #define PIES_CHLD_WAKEUP 0x02 +#define PIES_CHLD_GC 0x04 void pies_schedule_children (int op); @@ -330,7 +331,6 @@ void progman_cleanup (int expect_term); void progman_filter (int (*filter) (struct component *, void *data), void *data); int progman_wait_until (int (*cond) (void *), void *data); -void progman_stop_tag (const char *name); int progman_accept (int socket, void *data); void progman_create_sockets (void); -- cgit v1.2.1