From: NeilBrown Date: Mon, 2 Sep 2013 01:02:09 +0000 (+1000) Subject: Make sure "mdmon" doesn't get called "@dmon". X-Git-Tag: mdadm-3.3~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f1bcf43d93a991845b2ebee76850bd4dc5bc7fc;p=thirdparty%2Fmdadm.git Make sure "mdmon" doesn't get called "@dmon". The Anaconda installer (via its "loader" program) will try to kill many processes at shutdown, but not "mdmon". However when mdadm runs mdmon in the Anaconda environment, mdmon sets argv[0][0] to '@' resulting in "@dmon" which confuses "loader". So change mdadm to set argv[0] to a path so that mdmon becomes e.g. "@usr/sbin/mdmon" which "loader" will recognise as being "mdmon". Reported-by: Martin Wilck Signed-off-by: NeilBrown --- diff --git a/util.c b/util.c index 491a1075..c12fb211 100644 --- a/util.c +++ b/util.c @@ -1691,7 +1691,7 @@ int start_mdmon(char *devnm) char *paths[4] = { pathbuf, "/sbin/mdmon", - "mdmon", + "./mdmon", NULL }; @@ -1759,7 +1759,7 @@ int start_mdmon(char *devnm) for (i = 0; paths[i]; i++) if (paths[i][0]) { - execl(paths[i], "mdmon", + execl(paths[i], paths[i], devnm, NULL); } exit(1);