author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-24 11:29:15 (GMT) |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-02-24 11:32:57 (GMT) |
commit | 9912557fa9b4c8596c6e9f69857e9a616b4f4f33 (patch) (side-by-side diff) | |
tree | 348bcb58c3af3c5138abe6e3bdfda5232fc1e54c /src/prog.h | |
parent | 4049c8b3ba918949106ef8e96ac5e767f4b9406b (diff) | |
download | pies-9912557fa9b4c8596c6e9f69857e9a616b4f4f33.tar.gz pies-9912557fa9b4c8596c6e9f69857e9a616b4f4f33.tar.bz2 |
Changes in prog structure
* src/prog.h (prog): Remove .facility. Use facility from
the component.
(active,wait,stop): Move from union into the main struct.
All uses changed.
-rw-r--r-- | src/prog.h | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -45,15 +45,14 @@ struct prog struct prog *next, *prev; enum prog_type type; pid_t pid; /* PID */ - int facility; + int active :1; /* The prog is active */ + int wait :1; /* Wait for this prog to terminate */ + int stop :1; /* Stop this prog */ union { struct { struct component *comp; - 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 */ @@ -84,8 +83,7 @@ struct prog }; #define IS_COMPONENT(p) ((p)->type == TYPE_COMPONENT) -#define IS_ACTIVE_COMPONENT(prog) \ - (IS_COMPONENT(prog) && (prog)->v.p.active) +#define IS_ACTIVE_COMPONENT(prog) (IS_COMPONENT(prog) && (prog)->active) struct prog *progman_locate (const char *name); int progman_foreach (int (*filter) (struct prog *, void *data), void *data); |