aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 99769f2..b5619fe 100644
--- a/main.c
+++ b/main.c
@@ -13,6 +13,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
+#include <stdlib.h>
#include <cjson/cJSON.h>
@@ -155,7 +156,7 @@ static void print_component_name(const void *key, void *val, void *arg)
unfilled ? " (referenced only)" : "");
}
-int serve_scriptbase(struct scriptbase *base);
+int serve_scriptbase(struct scriptbase *base, bool);
int main(int argc, char *argv[])
{
@@ -174,7 +175,7 @@ int main(int argc, char *argv[])
puts("## LOADED PAGES:");
ht_map(&base.pages, (void*) 'p', print_component_name);
- if (serve_scriptbase(&base))
+ if (serve_scriptbase(&base, !!getenv("HYDRILLA_WAIT_SIGTERM")))
fprintf(stderr, "Error serving scriptbase.\n");
scriptbase_destroy(&base);