projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: optimize relaying stdio output of daemons a bit.
[project/procd.git]
/
service
/
instance.h
diff --git
a/service/instance.h
b/service/instance.h
index
a492f38
..
3fb33e9
100644
(file)
--- a/
service/instance.h
+++ b/
service/instance.h
@@
-17,10
+17,22
@@
#include <libubox/vlist.h>
#include <libubox/uloop.h>
#include <libubox/vlist.h>
#include <libubox/uloop.h>
+#include <libubox/ustream.h>
#include "../utils/utils.h"
#define RESPAWN_ERROR (5 * 60)
#include "../utils/utils.h"
#define RESPAWN_ERROR (5 * 60)
+struct jail {
+ bool procfs;
+ bool sysfs;
+ bool ubus;
+ bool log;
+ char *name;
+ char *root;
+ struct blobmsg_list mount;
+ int argc;
+};
+
struct service_instance {
struct vlist_node node;
struct service *srv;
struct service_instance {
struct vlist_node node;
struct service *srv;
@@
-29,12
+41,20
@@
struct service_instance {
int8_t nice;
bool valid;
int8_t nice;
bool valid;
+ uid_t uid;
+ gid_t gid;
+
bool halt;
bool restart;
bool respawn;
int respawn_count;
struct timespec start;
bool halt;
bool restart;
bool respawn;
int respawn_count;
struct timespec start;
+ bool trace;
+ bool has_jail;
+ struct jail jail;
+ char *seccomp;
+
uint32_t respawn_timeout;
uint32_t respawn_threshold;
uint32_t respawn_retry;
uint32_t respawn_timeout;
uint32_t respawn_threshold;
uint32_t respawn_retry;
@@
-42,6
+62,8
@@
struct service_instance {
struct blob_attr *config;
struct uloop_process proc;
struct uloop_timeout timeout;
struct blob_attr *config;
struct uloop_process proc;
struct uloop_timeout timeout;
+ struct ustream_fd _stdout;
+ struct ustream_fd _stderr;
struct blob_attr *command;
struct blob_attr *trigger;
struct blob_attr *command;
struct blob_attr *trigger;