Skip to content

Commit 4f97832

Browse files
committed
MEDIUM: cfgparse: 'daemon' not compatible with -Ws
Emit a warning when the 'daemon' keyword is used in master-worker mode for systemd (-Ws). This never worked and was always ignored by setting MODE_FOREGROUND during cmdline parsing.
1 parent 631233e commit 4f97832

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cfgparse-global.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,11 @@ static int cfg_parse_global_mode(char **args, int section_type,
995995
return -1;
996996

997997
if (strcmp(args[0], "daemon") == 0) {
998-
global.mode |= MODE_DAEMON;
998+
if (global.tune.options & GTUNE_USE_SYSTEMD) {
999+
ha_warning("'%s' is not compatible with -Ws (master-worker mode for systemd), ignoring.\n", args[0]);
1000+
} else {
1001+
global.mode |= MODE_DAEMON;
1002+
}
9991003

10001004
} else if (strcmp(args[0], "quiet") == 0) {
10011005
global.mode |= MODE_QUIET;

0 commit comments

Comments
 (0)