From: Valentine Krasnobaeva Date: Tue, 9 Jul 2024 11:59:12 +0000 (+0200) Subject: CLEANUP: haproxy: rm no longer used mworker_reexec_waitmode X-Git-Tag: v3.1-dev10~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7795d49ae6b0b0239bc43ad8b5b454245120478b;p=thirdparty%2Fhaproxy.git CLEANUP: haproxy: rm no longer used mworker_reexec_waitmode 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index 411562e396..f57dffb297 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -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); } /*