diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-01-01 22:29:31 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-01-27 23:59:55 +0100 |
commit | d6830301f215e96328fa4f9a5ad9e253830386c3 (patch) | |
tree | 0cd1708c8f3370c6ba5e349ead3c71d5fce854e5 /src/blogc-make | |
parent | 3136151c657a696ed0937d0600284b2d137ad828 (diff) | |
download | blogc-d6830301f215e96328fa4f9a5ad9e253830386c3.tar.gz blogc-d6830301f215e96328fa4f9a5ad9e253830386c3.tar.bz2 blogc-d6830301f215e96328fa4f9a5ad9e253830386c3.zip |
make: reloader: do not kill the process on reload failure
Diffstat (limited to 'src/blogc-make')
-rw-r--r-- | src/blogc-make/reloader.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/blogc-make/reloader.c b/src/blogc-make/reloader.c index a4b837d..0edbee7 100644 --- a/src/blogc-make/reloader.c +++ b/src/blogc-make/reloader.c @@ -26,14 +26,16 @@ bm_reloader_thread(void *arg) bm_reloader_t *reloader = arg; while (reloader->running) { if (!bm_ctx_reload(reloader->ctx)) { - fprintf(stderr, "blogc-make: error: failed to reload context. " - "reloader disabled!\n"); - break; + fprintf(stderr, "blogc-make: warning: failed to reload context. " + "retrying in 5 seconds ...\n\n"); + sleep(5); + continue; } if (0 != reloader->rule_exec(reloader->ctx, reloader->outputs, reloader->args)) { - fprintf(stderr, "blogc-make: error: failed to rebuild website. " - "reloader disabled!\n"); - break; + fprintf(stderr, "blogc-make: warning: failed to rebuild website. " + "retrying in 5 seconds ...\n\n"); + sleep(5); + continue; } sleep(1); } |