From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- mdmon.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/mdmon.c b/mdmon.c index ee68e3c..bdcda0e 100644 --- a/mdmon.c +++ b/mdmon.c @@ -457,8 +457,14 @@ static int mdmon(char *devname, int devnum, int must_fork, int takeover) sigaction(SIGPIPE, &act, NULL); victim = mdmon_pid(container->devnum); - if (victim >= 0) + if (victim >= 0) { victim_sock = connect_monitor(container->devname); + if (victim_sock < 0) { + fprintf(stderr, "mdmon: %s unable to connect monitor\n", + container->devname); + exit(3); + } + } ignore = chdir("/"); if (!takeover && victim > 0 && victim_sock >= 0) { -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html