From: Michel Normand Date: Thu, 28 May 2009 13:32:29 +0000 (+0200) Subject: add an error message if more than one monitor X-Git-Tag: lxc_0_6_3~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c396e124b92f4d24fffaf86de3ceb74c5c76afe;p=thirdparty%2Flxc.git add an error message if more than one monitor the change introduced by commit 31c53c2e1afc6c81ce4aad5ef4cb982cd2fea365 do not allow anymore to have more than one monitor. The purpose of this patch is to add an error message when such a condition is identified, eg: === lxc-monitor: bind : Address already in use === Signed-off-by: Michel Normand Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index 24e85e7ad..17d0a8e5e 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -142,10 +142,13 @@ int lxc_monitor_open(void) strcpy(offset, "lxc-monitor"); fd = socket(PF_UNIX, SOCK_DGRAM, 0); - if (fd < 0) + if (fd < 0) { + ERROR("socket : %s", strerror(errno)); return -1; + } if (bind(fd, (struct sockaddr *)&addr, sizeof(addr))) { + ERROR("bind : %s", strerror(errno)); close(fd); return -1; }