X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=main.cpp;fp=main.cpp;h=eccf6d707b40b76ba7231af7dc32b9aec76c1865;hp=98d0948de80f9acd835ee5dbea56e8290b15acda;hb=7628375363e006e2c272f98117609e1595f8cd1a;hpb=b757a4a2ce9d24835b52a185134835762af2f50c diff --git a/main.cpp b/main.cpp index 98d0948..eccf6d7 100644 --- a/main.cpp +++ b/main.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -541,10 +542,18 @@ start: log(INFO, "Re-exec happened in approx. %.0f ms.", glitch_time * 1000.0); } + sd_notify(0, "READY=1"); + while (!hupped) { usleep(100000); } + if (stopped) { + sd_notify(0, "STOPPING=1"); + } else { + sd_notify(0, "RELOADING=1"); + } + // OK, we've been HUPed. Time to shut down everything, serialize, and re-exec. err = clock_gettime(CLOCK_MONOTONIC, &serialize_start); assert(err != -1);