]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: haproxy: rm no longer used mworker_reexec_waitmode
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Tue, 9 Jul 2024 11:59:12 +0000 (13:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
This a first commit to prepare the removal of MODE_MWORKER_WAIT support. It has
became redundant with MODE_MWORKER, due to moving master-worker fork in init().
Master process does no longer perform reexec to free additional memory after
forking and does no longer changing its mode to MODE_MWORKER_WAIT, where it has
entered to its wait polling loop and has handled signals. Now, master enters in
this loop almost immediately after forking a worker and being always in mode
MODE_MWORKER.

So, we can remove mworker_reexec_waitmode() wrapper, which was used to set
HAPROXY_MWORKER_WAIT_ONLY variable and to call mworker_reexec(). But let's keep
for the moment the logic of reexec_on_failure() atexit callback for master in
order if in the future we will need to support this case again.

src/haproxy.c

index 411562e396f4a9740935c92248c5884f34c5cada..f57dffb297f8cb9a05b44a1d9ef632110de65606 100644 (file)
@@ -828,13 +828,6 @@ alloc_error:
        return;
 }
 
-/* reexec haproxy in waitmode */
-static void mworker_reexec_waitmode()
-{
-       setenv("HAPROXY_MWORKER_WAIT_ONLY", "1", 1);
-       mworker_reexec(0);
-}
-
 /* reload haproxy and emit a warning */
 void mworker_reload(int hardreload)
 {
@@ -937,7 +930,7 @@ void reexec_on_failure()
                sd_notify(0, "READY=1\nSTATUS=Reload failed!\n");
 #endif
 
-       mworker_reexec_waitmode();
+       mworker_reexec(0);
 }
 
 /*