summaryrefslogtreecommitdiffabout
path: root/src/prog.h
authorSergey 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)
commit9912557fa9b4c8596c6e9f69857e9a616b4f4f33 (patch) (side-by-side diff)
tree348bcb58c3af3c5138abe6e3bdfda5232fc1e54c /src/prog.h
parent4049c8b3ba918949106ef8e96ac5e767f4b9406b (diff)
downloadpies-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.
Diffstat (limited to 'src/prog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/prog.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/prog.h b/src/prog.h
index 3358885..be072e1 100644
--- a/src/prog.h
+++ b/src/prog.h
@@ -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);

Return to:

Send suggestions and report system problems to the System administrator.