summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/unit.c b/src/unit.c
index 429c2ce..b2cdd4c 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -93,8 +93,11 @@ typedef enum {
int unit_load_file(const char *path, Unit *out) {
memset(out, 0, sizeof(Unit));
out->state = STATE_STOPPED;
- out->stdin_fd = -1;
- out->stdout_fd = -1;
+ out->stdin_fd = -1;
+ out->stdout_fd = -1;
+ out->filter_pid = 0;
+ out->filter_in_fd = -1;
+ out->filter_out_fd = -1;
out->health.timeout_ms = 5000;
FILE *f = fopen(path, "r");
@@ -171,6 +174,8 @@ int unit_load_file(const char *path, Unit *out) {
strncpy(out->service, val, MAX_NAME - 1);
else if (strcmp(last_key, "broadcast_cmd") == 0)
strncpy(out->broadcast_cmd, val, sizeof(out->broadcast_cmd) - 1);
+ else if (strcmp(last_key, "log_filter") == 0)
+ strncpy(out->log_filter, val, MAX_PATH - 1);
break;
case SECTION_CONSOLE: