When using trace with -dt, the trace_parse_cmd() function is doing a strtok which write \0 into the argv string. When using the mworker mode, and reloading, argv was modified and the trace won't work anymore because the first : is replaced by a '\0'. This patch fixes the issue by allocating a temporary string so we don't modify the source string directly. It also replace strtok by its reentrant version strtok_r. Must be backported as far as 2.9. (cherry picked from commit 596db3ef86844617565a0b4b4ce8358fe6537d87) Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>