diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |