BUG/MINOR: mworker/cli: relative pid prefix not validated anymore
Since e8422bf ("MEDIUM: global: remove the relative_pid from global and mworker"), the relative pid prefix is not tested anymore on the master CLI. Which means any value will fall into the "1" process. Since we removed the nbproc, only the "1" and the "0" (master) value are correct, any other value should return an error. Fix issue #1793. This must be backported as far as 2.5.
This commit is contained in:
parent
0f17ab2fdd
commit
bac3a82a50
@ -2294,6 +2294,9 @@ static int pcli_prefix_to_pid(const char *prefix)
|
||||
if (proc_pid == 0) /* return the master */
|
||||
return 0;
|
||||
|
||||
if (proc_pid != 1) /* only the "@1" relative PID is supported */
|
||||
return -1;
|
||||
|
||||
/* chose the right process, the current one is the one with the
|
||||
least number of reloads */
|
||||
list_for_each_entry(child, &proc_list, list) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user