diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index e1835e7b6..117347aba 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -942,7 +942,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) ha_alert("parsing [%s:%d] : %s expects a process number " " ('all', 'odd', 'even', a number from 1 to %d or a range), " " followed by a list of CPU ranges with numbers from 0 to %d.\n", - file, linenum, args[0], MAX_PROCS, LONGBITS - 1); + file, linenum, args[0], LONGBITS, LONGBITS - 1); err_code |= ERR_ALERT | ERR_FATAL; goto out; } @@ -950,14 +950,18 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) if ((slash = strchr(args[1], '/')) != NULL) *slash = 0; - if (parse_process_number(args[1], &proc, MAX_PROCS, &autoinc, &errmsg)) { + /* note: we silently ignore processes over MAX_PROCS and + * threads over MAX_THREADS so as not to make configurations a + * pain to maintain. + */ + if (parse_process_number(args[1], &proc, LONGBITS, &autoinc, &errmsg)) { ha_alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg); err_code |= ERR_ALERT | ERR_FATAL; goto out; } if (slash) { - if (parse_process_number(slash+1, &thread, MAX_THREADS, NULL, &errmsg)) { + if (parse_process_number(slash+1, &thread, LONGBITS, NULL, &errmsg)) { ha_alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg); err_code |= ERR_ALERT | ERR_FATAL; goto out;