X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=service%2Finstance.h;h=3fb33e9b1cd7891018ae9e1f3f8b13bde6018ae7;hp=65b670ed0202a593ba5ec0c8b34fb6cfb88ec25f;hb=7df968175ffd3bc7df5682d5852fbf20fe454759;hpb=916f95cb58604038695347ee41a430d8ca1f0556 diff --git a/service/instance.h b/service/instance.h index 65b670e..3fb33e9 100644 --- a/service/instance.h +++ b/service/instance.h @@ -17,10 +17,22 @@ #include #include +#include #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; @@ -29,12 +41,20 @@ struct service_instance { int8_t nice; bool valid; + uid_t uid; + gid_t gid; + 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; @@ -42,6 +62,8 @@ struct service_instance { 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; @@ -49,6 +71,8 @@ struct service_instance { struct blobmsg_list data; struct blobmsg_list netdev; struct blobmsg_list file; + struct blobmsg_list limits; + struct blobmsg_list errors; }; void instance_start(struct service_instance *in);