aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-11 13:29:13 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-04-11 15:05:16 +0200
commit67d000cdc37009a975d0794f6fd347dfb17743eb (patch)
treedfc3f46ae2643ebaf6224295fe9df48deee470aa /lib/include
parent77725291efd609339cc560bec646782bc09ffb90 (diff)
Cleanup: redeuce number of allocations in rdsvc
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/service.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/include/service.h b/lib/include/service.h
index eaa35bb..fee3ea3 100644
--- a/lib/include/service.h
+++ b/lib/include/service.h
@@ -45,16 +45,16 @@ enum {
};
typedef struct exec_t {
- char **argv; /* NULL terminated argument vector */
- char *raw_argv; /* backing store for argv contents */
-
struct exec_t *next;
+ char **argv; /* NULL terminated argument vector */
+ char buffer[]; /* backing store for argv */
} exec_t;
typedef struct service_t {
+ struct service_t *next;
+
int type; /* SVC_* service type */
int target; /* TGT_* service target */
- char *name; /* canonical service name */
char *desc; /* description string */
char *ctty; /* controlling tty or log file */
int rspwn_limit; /* maximum respawn count */
@@ -74,7 +74,7 @@ typedef struct service_t {
pid_t pid;
int status; /* process exit status */
- struct service_t *next;
+ char name[]; /* canonical service name */
} service_t;
typedef struct {