]> git.kaiwu.me - nginx.git/commitdiff
Control API: warn in single process mode only if API is enabled
authorPiotr Przybylski <piotrprz@gmail.com>
Sun, 25 Oct 2026 12:54:45 +0000 (13:54 +0100)
committerAva Hahn <110854134+avahahn@users.noreply.github.com>
Thu, 5 Nov 2026 00:16:45 +0000 (16:16 -0800)
Previously, the "control API unavailable in single process mode"
warning was logged on every start in single process mode, even
without the "-l" option.

src/core/nginx.c

index 464911f60614ce39e94c6dc98ab7c00c1e93994e..a71d4cee7d93f1cbe5d6fcf77b868f99a4f71155 100644 (file)
@@ -368,7 +368,7 @@ main(int argc, char *const *argv)
 #endif
 
 #if (NGX_CONTROL_API)
-    if (ngx_process == NGX_PROCESS_SINGLE) {
+    if (ngx_control_api_enabled && ngx_process == NGX_PROCESS_SINGLE) {
         ngx_log_error(NGX_LOG_WARN, cycle->log, 0,
                       "control API unavailable in single process mode");