From 03706ed5b2af4eaeb72ae1fc0d58f185fad272f7 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 12 Aug 2014 18:06:18 +1000 Subject: [PATCH] Only add the handover parameter on restart if it's not already set --- src/ckpool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ckpool.c b/src/ckpool.c index b4828e33..77bf20cf 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -275,8 +275,10 @@ retry: LOGWARNING("Failed to send_procmsg to connector"); } else if (cmdmatch(buf, "restart")) { if (!fork()) { - ckp->initial_args[ckp->args++] = strdup("-H"); - ckp->initial_args[ckp->args] = NULL; + if (!ckp->handover) { + ckp->initial_args[ckp->args++] = strdup("-H"); + ckp->initial_args[ckp->args] = NULL; + } execv(ckp->initial_args[0], (char *const *)ckp->initial_args); } } else {