aboutsummaryrefslogtreecommitdiff
path: root/src/prog.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-02-19 08:41:12 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-02-19 08:41:12 +0200
commite6902abfddb4d7b16dc9a4231a3781f354a08cd5 (patch)
treec634621af2ae765460e010ce83c8492ed4e859bc /src/prog.h
parent51a797445a4bfc34ad1ae7ea91e12486d823abda (diff)
downloadpies-e6902abfddb4d7b16dc9a4231a3781f354a08cd5.tar.gz
pies-e6902abfddb4d7b16dc9a4231a3781f354a08cd5.tar.bz2
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)<stop>: New boolean member. * src/progman.c (progman_cleanup) (progman_stop_component): Clear the stop flag. (progman_gc): New function. (progman_stop_tag): Remove.
Diffstat (limited to 'src/prog.h')
-rw-r--r--src/prog.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/prog.h b/src/prog.h
index 316a229..4e86596 100644
--- a/src/prog.h
+++ b/src/prog.h
@@ -51,8 +51,9 @@ struct prog
struct
{
struct component *comp;
- int wait :1;
- int active :1;
+ int active :1; /* The prog is active */
+ int wait :1; /* Wait for this prog to terminate */
+ int stop :1; /* Stop this prog */
int socket;
struct prog *redir[2]; /* Pointers to redirectors */
time_t timestamp; /* Time of last startup */

Return to:

Send suggestions and report system problems to the System administrator.